From 80737327b217136661f8fa5c911b3943656a9ae0 Mon Sep 17 00:00:00 2001 From: Samuel Vanderwaal Date: Sat, 14 Oct 2023 13:26:30 -0800 Subject: [PATCH] clean up decode errors and messages --- src/errors.rs | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/errors.rs b/src/errors.rs index 137495c5..97a5cac4 100644 --- a/src/errors.rs +++ b/src/errors.rs @@ -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), }