#[non_exhaustive]pub enum BorsaError {
Unsupported {
capability: String,
},
Data(String),
InvalidArg(String),
Connector {
connector: String,
msg: String,
},
Other(String),
NotFound {
what: String,
},
AllProvidersFailed(Vec<BorsaError>),
ProviderTimeout {
connector: String,
capability: String,
},
RequestTimeout {
capability: String,
},
AllProvidersTimedOut {
capability: String,
},
StrictSymbolsRejected {
rejected: Vec<String>,
},
}Expand description
Unified error type for the borsa workspace.
This wraps capability mismatches, argument validation errors, provider-tagged failures, not-found conditions, and an aggregate for multi-provider attempts.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Unsupported
The requested capability is not implemented by the target connector.
Data(String)
Issues with the returned or expected data (missing fields, etc.).
InvalidArg(String)
Invalid input argument.
Connector
An individual connector returned an error.
Other(String)
Unknown/opaque error.
NotFound
A resource or symbol could not be found.
AllProvidersFailed(Vec<BorsaError>)
All selected providers failed; contains the individual failures.
ProviderTimeout
An individual provider call exceeded the configured timeout.
Fields
RequestTimeout
The overall request exceeded the configured deadline.
AllProvidersTimedOut
All attempted providers timed out for the requested capability.
StrictSymbolsRejected
Strict routing policy rejected one or more requested symbols for streaming.
Implementations§
Source§impl BorsaError
impl BorsaError
Sourcepub fn unsupported(cap: impl Into<String>) -> Self
pub fn unsupported(cap: impl Into<String>) -> Self
Helper: build an Unsupported error for a capability string.
Sourcepub fn connector(connector: impl Into<String>, msg: impl Into<String>) -> Self
pub fn connector(connector: impl Into<String>, msg: impl Into<String>) -> Self
Helper: build a Connector error with the connector name and message.
Sourcepub fn not_found(what: impl Into<String>) -> Self
pub fn not_found(what: impl Into<String>) -> Self
Helper: build a NotFound error for a description of the missing resource.
Sourcepub fn provider_timeout(
connector: impl Into<String>,
capability: impl Into<String>,
) -> Self
pub fn provider_timeout( connector: impl Into<String>, capability: impl Into<String>, ) -> Self
Helper: build a ProviderTimeout error.
Sourcepub fn request_timeout(capability: impl Into<String>) -> Self
pub fn request_timeout(capability: impl Into<String>) -> Self
Helper: build a RequestTimeout error.
Sourcepub fn is_actionable(&self) -> bool
pub fn is_actionable(&self) -> bool
Returns true if this error should be surfaced to users as actionable.
Non-actionable errors are those indicating capability absence or a benign not-found condition. Aggregates are classified based on their contents.
Trait Implementations§
Source§impl Clone for BorsaError
impl Clone for BorsaError
Source§fn clone(&self) -> BorsaError
fn clone(&self) -> BorsaError
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more