Skip to content

Commit

Permalink
clean up decode errors and messages
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelvanderwaal committed Oct 14, 2023
1 parent f3b41bc commit 8073732
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,16 @@ use thiserror::Error;

#[derive(Error, Debug)]
pub enum DecodeError {
#[error("no account data found")]
MissingAccount(String),

#[error("failed to get account data")]
#[error("Client Error: '{0}'")]
ClientError(ClientErrorKind),

#[error("network request failed after three attempts: ensure you used a valid address and check the state of the Solana cluster")]
#[error("Network Error: '{0}'")]
NetworkError(String),

#[error("failed to parse string into Pubkey")]
#[error("Pubkey Parsing Failed: '{0}'")]
PubkeyParseFailed(String),

#[error("failed to decode metadata")]
#[error("Metadata Decode Failed: '{0}'")]
DecodeMetadataFailed(String),
}

Expand Down

0 comments on commit 8073732

Please sign in to comment.