pub enum OperationalError {
NetworkError {
message: String,
},
DatabaseConnectionError {
message: String,
},
Timeout {
operation: String,
},
RateLimited {
service: String,
retry_after_ms: i64,
},
Internal {
message: String,
},
Unavailable {
resource: String,
},
RetryExhausted {
reason: String,
},
SerializationError {
message: String,
},
}Expand description
Operational errors that don’t affect business logic.
These errors are for infrastructure concerns and can be sampled/discarded for telemetry purposes.
Variants§
NetworkError
Network or connection error
DatabaseConnectionError
Database connection error
Timeout
Operation timed out
RateLimited
Rate limited by external service
Internal
Internal error (unexpected)
Resource temporarily unavailable
RetryExhausted
Retries exhausted
SerializationError
Serialization/deserialization error
Implementations§
Trait Implementations§
Source§impl Clone for OperationalError
impl Clone for OperationalError
Source§fn clone(&self) -> OperationalError
fn clone(&self) -> OperationalError
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl ComposeSchema for OperationalError
impl ComposeSchema for OperationalError
Source§impl Debug for OperationalError
impl Debug for OperationalError
Source§impl<'de> Deserialize<'de> for OperationalError
impl<'de> Deserialize<'de> for OperationalError
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Display for OperationalError
impl Display for OperationalError
Source§impl Error for OperationalError
impl Error for OperationalError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl ErrorClassifiable for OperationalError
impl ErrorClassifiable for OperationalError
Source§fn is_retryable(&self) -> bool
fn is_retryable(&self) -> bool
Whether this error can be retried automatically.
Source§fn requires_user_intervention(&self) -> bool
fn requires_user_intervention(&self) -> bool
Whether this error requires a human to intervene.
Source§fn retry_after_ms(&self) -> Option<u64>
fn retry_after_ms(&self) -> Option<u64>
Suggested retry delay in milliseconds (None = use default backoff).
Source§fn max_retries(&self) -> u32
fn max_retries(&self) -> u32
Maximum number of retries before giving up.
Source§impl PartialEq for OperationalError
impl PartialEq for OperationalError
Source§impl Serialize for OperationalError
impl Serialize for OperationalError
Source§impl ToSchema for OperationalError
impl ToSchema for OperationalError
impl StructuralPartialEq for OperationalError
Auto Trait Implementations§
impl Freeze for OperationalError
impl RefUnwindSafe for OperationalError
impl Send for OperationalError
impl Sync for OperationalError
impl Unpin for OperationalError
impl UnwindSafe for OperationalError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more