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 9391731 commit 8732084
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 @@ -32,6 +32,8 @@ pub enum Error {
LedgerDoesNotRevealSecretKey,
#[error(transparent)]
Keyring(#[from] keyring::Error),
#[error("Secure Store does not reveal secret key")]
SecureStoreDoesNotRevealSecretKey,
}

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

Expand Down

0 comments on commit 8732084

Please sign in to comment.