Skip to main content

ErrorClassification

Trait ErrorClassification 

Source
pub trait ErrorClassification {
    // Required method
    fn is_transient(&self) -> bool;
}
Expand description

Trait for classifying errors as transient (retriable) or permanent.

Transient errors are those where a retry might succeed (e.g. a momentary I/O interruption). Permanent errors (e.g. NotFound, auth failure) should return false so they are surfaced immediately.

Required Methods§

Source

fn is_transient(&self) -> bool

Returns true if this error is transient and the operation should be retried (subject to the RetryPolicy limits).

Implementors§

Source§

impl ErrorClassification for ServerError

Classify ServerError variants as transient (retriable) or permanent.

This implementation is deliberately conservative: only ServerError::DirectoryCreation with obviously transient I/O kinds is classified as transient. String-typed variants (Storage, Network, Cluster) are kept permanent because their underlying cause cannot be determined without parsing the message.