pub enum ErrorKind {
Show 20 variants
Authentication,
PermissionDenied,
NotFound,
InvalidRequest,
ContextLengthExceeded,
ContentFiltered,
RateLimited,
Overloaded,
Timeout,
Connection,
Cancelled,
Decode,
StreamProtocol,
ProviderInternal,
Unsupported,
Configuration,
Normalization,
Tool,
MaxSteps,
Unknown,
}Expand description
Stable high-level classification for SDK errors.
Variants§
Authentication
No API key was configured, or the provider rejected it (HTTP 401).
PermissionDenied
The credentials are valid but lack access to the resource (HTTP 403).
NotFound
The requested resource does not exist (HTTP 404).
InvalidRequest
The provider rejected the request as malformed (HTTP 400-class).
ContextLengthExceeded
The prompt or output exceeds the model’s context window.
ContentFiltered
The request or output was blocked by a safety or content policy.
RateLimited
The provider is rate limiting the account (HTTP 429).
Overloaded
The provider is temporarily overloaded (e.g. HTTP 425 or 529).
Timeout
The request timed out.
Connection
A network-level failure prevented reaching the provider.
Cancelled
The request was cancelled by the caller.
Decode
A response body could not be decoded.
StreamProtocol
The provider emitted a malformed or unexpected stream event.
ProviderInternal
The provider itself reported an internal error (HTTP 5xx).
Unsupported
The selected provider does not support the requested operation.
Configuration
The SDK or provider client was misconfigured.
Normalization
Request normalization failed.
Tool
A tool invocation failed or referenced an unknown tool.
MaxSteps
The agent loop exhausted its step budget.
Unknown
The error could not be classified.
Implementations§
Trait Implementations§
impl Copy for ErrorKind
impl Eq for ErrorKind
impl StructuralPartialEq for ErrorKind
Auto Trait Implementations§
impl Freeze for ErrorKind
impl RefUnwindSafe for ErrorKind
impl Send for ErrorKind
impl Sync for ErrorKind
impl Unpin for ErrorKind
impl UnsafeUnpin for ErrorKind
impl UnwindSafe for ErrorKind
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.