deribit_http/error/
mod.rs

1//! Error handling module for HTTP client
2
3/// HTTP client error types
4#[derive(Debug, thiserror::Error)]
5pub enum HttpError {
6    /// Config error
7    #[error("Configuration error: {0}")]
8    ConfigError(String),
9
10    /// Request failed with HTTP error
11    #[error("Request failed: {0}")]
12    RequestFailed(String),
13
14    /// Authentication failed with the API
15    #[error("Authentication failed: {0}")]
16    AuthenticationFailed(String),
17
18    /// API rate limit has been exceeded
19    #[error("Rate limit exceeded")]
20    RateLimitExceeded,
21
22    /// Invalid response format received from API
23    #[error("Invalid response format: {0}")]
24    InvalidResponse(String),
25
26    /// Network connection error occurred
27    #[error("Network error: {0}")]
28    NetworkError(String),
29
30    /// Error parsing
31    #[error("Parse error: {0}")]
32    ParseError(String),
33}