#[non_exhaustive]pub enum ModelInvokeErrorKind {
Transient,
TimedOut,
Cancelled,
Permanent,
Undecodable,
InvalidRequest,
UnknownOutcome,
}Expand description
Classification of a logical model invocation failure.
More kinds may be added; a match needs a wildcard arm, and an unknown kind
is best treated like Self::Permanent: not retried.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Transient
Recoverable failure a retry policy may allow: transport hiccups, rate limits, server-side errors.
TimedOut
The request exceeded its deadline.
Cancelled
The invocation was cancelled through its CallControl, before send
or while in flight.
Permanent
Another attempt will not help. Usually the provider refused: a rejected credential, an unknown model or path, or any other refusal not classified below; such an error carries a status, or a code when it arrived inside a successful response. Without either, the fault is local: the transport could not build the request.
Undecodable
The provider answered and the adapter could not use the answer: a
success body or stream that is malformed or breaks the protocol’s own
rules, or any response over a configured size limit. Not retryable. Unlike
Self::Permanent, changing the credential, model or endpoint
setting is not the remedy; the adapter and the server disagree about
the wire.
InvalidRequest
The request itself is malformed. Either the provider rejected it, or the adapter refused it before anything was sent: options outside the protocol’s range, a body that is not an object, or a decoder used against its contract.
UnknownOutcome
No observable outcome — e.g. a stream that ended without Done.