Skip to content

Commit

Permalink
review: remove error source from error message
Browse files Browse the repository at this point in the history
  • Loading branch information
SantiagoPittella committed Jan 23, 2025
1 parent fa6ea57 commit f271502
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions bin/miden-cli/src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@ use thiserror::Error;

#[derive(Debug, Diagnostic, Error)]
pub enum CliError {
#[error("account error: {1} with error {0}")]
#[error("account error: {1}")]
#[diagnostic(code(cli::account_error))]
Account(#[source] AccountError, String),
#[error("account id error: {0} with error {1}")]
#[error("account id error: {0}")]
#[diagnostic(code(cli::accountid_error), help("Check the account ID format."))]
AccountId(#[source] AccountIdError, String),
#[error("asset error: {0}")]
#[error("asset error")]
#[diagnostic(code(cli::asset_error))]
Asset(#[source] AssetError),
#[error("client error")]
#[diagnostic(code(cli::client_error))]
Client(#[from] ClientError),
#[error("config error: {1} with error {0}")]
#[error("config error: {1}")]
#[diagnostic(
code(cli::config_error),
help("Check if the configuration file exists and is well-formed.")
Expand All @@ -43,10 +43,10 @@ pub enum CliError {
#[error("missing flag: {0}")]
#[diagnostic(code(cli::config_error), help("Check the configuration file format."))]
MissingFlag(String),
#[error("parse error: {1} with error {0}")]
#[error("parse error: {1}")]
#[diagnostic(code(cli::parse_error), help("Check the inputs."))]
Parse(#[source] Box<dyn StdError + Send + Sync>, String),
#[error("transaction error: {1} with error {0}")]
#[error("transaction error: {1}")]
#[diagnostic(code(cli::transaction_error))]
Transaction(#[source] Box<dyn StdError + Send + Sync>, String),
}
Expand Down

0 comments on commit f271502

Please sign in to comment.