#[non_exhaustive]pub enum Error {
Transient {
message: String,
retry_after: Option<Duration>,
},
Permanent {
message: String,
},
Integrity {
message: String,
},
AbsentPrice {
asset: String,
},
Unsupported {
protocol: Protocol,
capability: Capability,
backend: Source,
},
Provider(Box<dyn Error + Send + Sync>),
}Expand description
Everything a fetch can fail with. The three financially-meaningful kinds are
Transient (retryable), Integrity (a required source
failed → fail closed), and AbsentPrice (never coerce to 0/1).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Transient
A transient provider failure (HTTP 429, timeout). Safe to retry.
Fields
Permanent
A permanent failure — a bad address, an unsupported chain, malformed config. Not retryable.
Integrity
A required source failed or returned incomplete data. The engine fails closed rather than return partial financial data.
AbsentPrice
No price is available for an asset. Never substituted with 0 or 1.
Unsupported
The requested capability is not offered by any registered backend of this protocol.
Fields
capability: CapabilityThe capability asked for.
Provider(Box<dyn Error + Send + Sync>)
An error from an injected provider (HTTP client, RPC transport, custom adapter). Opaque on purpose so extension points aren’t forced into this enum.
Implementations§
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()