Skip to content

Commit

Permalink
Return error when trying to get Secure Store secret
Browse files Browse the repository at this point in the history
  • Loading branch information
elizabethengelman committed Dec 2, 2024
1 parent f98b709 commit 0f3106b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cmd/soroban-cli/src/config/secret.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ pub enum Error {
Signer(#[from] signer::Error),
#[error(transparent)]
Keyring(#[from] keyring::Error),
#[error("Secure Store does not reveal secret key")]
SecureStoreDoesNotRevealSecretKey,
}

#[derive(Debug, clap::Args, Clone)]
Expand Down Expand Up @@ -123,7 +125,9 @@ impl Secret {
.private()
.0,
)?,
Secret::SecureStore { .. } => panic!("Secure Store does not reveal secret key"),
Secret::SecureStore { .. } => {
return Err(Error::SecureStoreDoesNotRevealSecretKey);
}
})
}

Expand Down

0 comments on commit 0f3106b

Please sign in to comment.