pub enum LlmErrorKind {
RateLimit,
Timeout,
Unavailable,
Auth,
BadRequest,
Other,
}Expand description
A coarse, provider-agnostic classification of an LlmError.
Deliberately small and stable: it names only the distinctions a caller acts
on (retry vs. fail, and which status to surface), not a full provider
taxonomy. kind_from_http_status maps an HTTP status onto these.
Variants§
RateLimit
Rate-limited / quota exhausted (HTTP 429). Retryable after backoff.
Timeout
Upstream timed out (HTTP 408/504, or a client read/connect timeout). Retryable.
Transient upstream unavailability (HTTP 5xx, connection refused/reset, DNS, stream break). Retryable.
Auth
Authentication / authorization failure (HTTP 401/403). Terminal — retrying with the same credentials won’t help.
BadRequest
The request itself was rejected (HTTP 400/404/422, unknown model). Terminal.
Other
Anything else — an unclassified or internal failure.
Trait Implementations§
Source§impl Clone for LlmErrorKind
impl Clone for LlmErrorKind
Source§fn clone(&self) -> LlmErrorKind
fn clone(&self) -> LlmErrorKind
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for LlmErrorKind
Source§impl Debug for LlmErrorKind
impl Debug for LlmErrorKind
Source§impl Default for LlmErrorKind
impl Default for LlmErrorKind
Source§fn default() -> LlmErrorKind
fn default() -> LlmErrorKind
impl Eq for LlmErrorKind
Source§impl PartialEq for LlmErrorKind
impl PartialEq for LlmErrorKind
Source§fn eq(&self, other: &LlmErrorKind) -> bool
fn eq(&self, other: &LlmErrorKind) -> bool
self and other values to be equal, and is used by ==.