pub enum DukascopyError {
Show 16 variants
Transport {
kind: TransportErrorKind,
status: Option<u16>,
message: String,
},
LzmaError(String),
InvalidTickData,
InvalidCurrencyCode {
code: String,
reason: String,
},
DataNotFoundFor {
pair: String,
timestamp: String,
},
DataNotFound,
RateLimitExceeded,
Unauthorized,
Forbidden,
InvalidRequest(String),
MissingDefaultQuoteCurrency,
PairResolutionDisabled,
NoConversionRoute {
symbol: String,
quote: String,
},
Timeout(u64),
CacheError(String),
Unknown(String),
}Expand description
Errors that can occur when using the Dukascopy FX library.
Variants§
Transport
Structured transport/network error.
Fields
kind: TransportErrorKindTransport error category.
LzmaError(String)
LZMA decompression failed
InvalidTickData
Tick data is malformed or invalid
InvalidCurrencyCode
Invalid currency code provided
DataNotFoundFor
No data available for the requested time/pair
DataNotFound
Generic data not found (for backward compatibility)
RateLimitExceeded
API rate limit exceeded
Unauthorized access (HTTP 401)
Forbidden
Forbidden access (HTTP 403)
InvalidRequest(String)
Invalid request (HTTP 400)
MissingDefaultQuoteCurrency
Missing configured default quote currency for symbol-only request.
PairResolutionDisabled
Symbol-only resolution is disabled in client configuration.
NoConversionRoute
No available direct or synthetic route for symbol conversion.
Timeout(u64)
Request timeout
CacheError(String)
Cache error
Unknown(String)
Unknown error with context
Implementations§
Source§impl DukascopyError
impl DukascopyError
Sourcepub fn is_retryable(&self) -> bool
pub fn is_retryable(&self) -> bool
Returns true if this error is retryable.
Retryable errors are transient and may succeed on retry:
- Rate limiting
- Timeouts
- Some HTTP errors
Sourcepub fn is_not_found(&self) -> bool
pub fn is_not_found(&self) -> bool
Returns true if this error indicates the data doesn’t exist.
Sourcepub fn is_validation_error(&self) -> bool
pub fn is_validation_error(&self) -> bool
Returns true if this error is due to invalid input.
Sourcepub fn is_configuration_error(&self) -> bool
pub fn is_configuration_error(&self) -> bool
Returns true if error is caused by client configuration.
Trait Implementations§
Source§impl Clone for DukascopyError
impl Clone for DukascopyError
Source§fn clone(&self) -> DukascopyError
fn clone(&self) -> DukascopyError
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more