pub enum Error {
Auth(String),
RateLimited(String),
Network(String),
Unavailable(String),
Model(String),
Tool(String),
Config(String),
Other(String),
}Expand description
Top-level error type for mixtape operations
This enum provides a flattened view of errors, categorized by how users typically need to handle them:
Error::Auth- Fix credentials and retryError::RateLimited- Back off and retryError::Network- Check connectivity, retryError::Unavailable- Service is down, wait and retryError::Model- Model-side issues (content filtered, context too long)Error::Tool- Tool execution failedError::Config- Fix configuration (bad model ID, missing parameters)
Variants§
Auth(String)
Authentication failed (invalid or expired credentials)
RateLimited(String)
Rate limited - slow down requests
Network(String)
Network connectivity issue
Service temporarily unavailable
Model(String)
Model error (content filtered, context too long, empty response, etc.)
Tool(String)
Tool execution failed
Config(String)
Configuration error (bad model ID, missing parameters)
Other(String)
Other error
Implementations§
Source§impl Error
impl Error
Sourcepub fn is_rate_limited(&self) -> bool
pub fn is_rate_limited(&self) -> bool
Returns true if this is a rate limiting error
Sourcepub fn is_network(&self) -> bool
pub fn is_network(&self) -> bool
Returns true if this is a network error
Returns true if the service is unavailable
Sourcepub fn is_retryable(&self) -> bool
pub fn is_retryable(&self) -> bool
Returns true if this error is potentially retryable
Retryable errors include rate limiting, network issues, and service unavailability. Authentication and configuration errors are not retryable without user intervention.