Skip to content

Commit 0f3106b

Browse files
Return error when trying to get Secure Store secret
1 parent f98b709 commit 0f3106b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

cmd/soroban-cli/src/config/secret.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ pub enum Error {
2929
Signer(#[from] signer::Error),
3030
#[error(transparent)]
3131
Keyring(#[from] keyring::Error),
32+
#[error("Secure Store does not reveal secret key")]
33+
SecureStoreDoesNotRevealSecretKey,
3234
}
3335

3436
#[derive(Debug, clap::Args, Clone)]
@@ -123,7 +125,9 @@ impl Secret {
123125
.private()
124126
.0,
125127
)?,
126-
Secret::SecureStore { .. } => panic!("Secure Store does not reveal secret key"),
128+
Secret::SecureStore { .. } => {
129+
return Err(Error::SecureStoreDoesNotRevealSecretKey);
130+
}
127131
})
128132
}
129133

0 commit comments

Comments
 (0)