#[non_exhaustive]pub enum ModelErrorKind {
Show 19 variants
RateLimited,
Overloaded,
Unavailable,
Transport,
Timeout,
StreamInterrupted,
ContextTooLong,
InvalidRequest,
NotFound,
Auth,
NoCredentials,
Billing,
Denied,
ServerError,
Protocol,
Cancelled,
Unsupported,
NotRecorded,
ProvidersUnavailable,
}Expand description
What kind of failure a model call had. Assigned once, by the protocol client that saw it; everything above reads it.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
RateLimited
429, or a body saying rate_limit_error.
Overloaded
503, 529, or a body saying overloaded_error.
408, 500, 502, 504: the server side failed and the request was fine.
Transport
Nothing usable came back: connection reset, DNS, TLS.
Timeout
No response headers, or no next event, within the idle window.
StreamInterrupted
The stream broke off before the message ended.
ContextTooLong
The request was refused for its size.
InvalidRequest
Any other 4xx.
NotFound
Auth
401, 403.
NoCredentials
There was no credential to send, so nothing was sent.
Billing
402, or a body saying billing_error.
Denied
The egress policy refused the connection.
ServerError
Any other 5xx.
Protocol
The response could not be read: SSE framing, JSON shape.
Cancelled
Unsupported
The provider cannot do what the call asked of it.
NotRecorded
A replay was asked for a call its recording does not hold, and the call is one a replay is allowed to go without — the caller skips it rather than reporting a failure.
Every provider in the order was out of quota or failed to take the call; the message says why for each.
Implementations§
Source§impl ModelErrorKind
impl ModelErrorKind
pub fn as_str(self) -> &'static str
Sourcepub fn request_failure(self) -> RequestFailure
pub fn request_failure(self) -> RequestFailure
What a client’s backoff policy is told about a request that failed before its first byte.