1use thiserror::Error;
3
4#[derive(Debug, Error)]
5pub enum LightspeedError {
6 #[error("Invalid API key format")]
7 InvalidApiKey,
8
9 #[error("Invalid tip address: {0}")]
10 InvalidTipAddress(String),
11
12 #[error("Tip amount {0} is below minimum {1}")]
13 TipBelowMinimum(u64, u64),
14
15 #[error("Insufficient balance: need {0} lamports, but account only has {1} lamports")]
16 InsufficientBalance(u64, u64),
17
18 #[error("Keep-alive is already running")]
19 KeepAliveAlreadyRunning,
20
21 #[error("Network error: {0}")]
22 NetworkError(#[from] reqwest::Error),
23
24 #[error("Transaction failed: {0}")]
25 TransactionFailed(String),
26
27 #[error("Solana client error: {0}")]
28 SolanaError(#[from] solana_client::client_error::ClientError),
29
30 #[error("Invalid URL: {0}")]
31 InvalidUrl(String),
32
33 #[error("Configuration error: {0}")]
34 ConfigurationError(String),
35
36 #[error("Serialization error: {0}")]
37 SerializationError(#[from] serde_json::Error),
38
39 #[error("Bincode error: {0}")]
40 BincodeError(#[from] bincode::Error),
41}