pub enum LlmErrorKind {
Unauthorized,
RateLimited,
BadRequest,
UpstreamError,
MalformedBody,
EmptyContent,
Timeout,
Transport,
}Expand description
How an LLM call failed, as a stable metric label.
Variants§
401/403 — credentials missing, wrong, or revoked.
RateLimited
429 — provider-side rate limiting / backpressure.
BadRequest
Other 4xx — a malformed or rejected request.
UpstreamError
5xx or an otherwise unclassified upstream failure.
MalformedBody
The response body could not be parsed into the expected shape.
EmptyContent
The response parsed but carried no usable content.
Timeout
The call exceeded its deadline.
Transport
A connection-level failure before any HTTP status was seen.
Implementations§
Source§impl LlmErrorKind
impl LlmErrorKind
Sourcepub const fn from_status(status: u16) -> Self
pub const fn from_status(status: u16) -> Self
Classify an HTTP status code, mirroring the adapters’ error
mapping. Takes a raw u16 so the core stays free of any HTTP
client dependency.
Trait Implementations§
Source§impl Clone for LlmErrorKind
impl Clone for LlmErrorKind
Source§fn clone(&self) -> LlmErrorKind
fn clone(&self) -> LlmErrorKind
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for LlmErrorKind
Source§impl Debug for LlmErrorKind
impl Debug for LlmErrorKind
impl Eq for LlmErrorKind
Source§impl Hash for LlmErrorKind
impl Hash for LlmErrorKind
Source§impl PartialEq for LlmErrorKind
impl PartialEq for LlmErrorKind
impl StructuralPartialEq for LlmErrorKind
Auto Trait Implementations§
impl Freeze for LlmErrorKind
impl RefUnwindSafe for LlmErrorKind
impl Send for LlmErrorKind
impl Sync for LlmErrorKind
impl Unpin for LlmErrorKind
impl UnsafeUnpin for LlmErrorKind
impl UnwindSafe for LlmErrorKind
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