rustywallet_checker/error.rs
1//! Error types for rustywallet-checker
2
3use thiserror::Error;
4
5/// Errors that can occur when checking balances
6#[derive(Debug, Error)]
7pub enum CheckerError {
8 /// Network/HTTP error
9 #[error("Network error: {0}")]
10 Network(#[from] reqwest::Error),
11
12 /// Invalid address format
13 #[error("Invalid address: {0}")]
14 InvalidAddress(String),
15
16 /// API returned an error
17 #[error("API error: {0}")]
18 ApiError(String),
19
20 /// Rate limited by API
21 #[error("Rate limited, please try again later")]
22 RateLimited,
23
24 /// Failed to parse response
25 #[error("Parse error: {0}")]
26 ParseError(String),
27}