Expand description
Errors that provider adapters can return.
ProviderError is the single error type of every adapter method. Each
variant wraps a concrete error struct so that callers can match on the
failure class and read structured fields. Large payloads are boxed to keep
the enum small enough to pass through Result cheaply.
Structs§
- ApiCall
Error - An HTTP request to the provider failed or returned an error status.
- Empty
Response Body Error - The provider returned an empty body where one was required.
- Invalid
Argument Error - A call argument is invalid.
- Invalid
Prompt Error - The prompt cannot be used with this provider.
- Invalid
Response Data Error - The response has an unexpected shape.
- Json
Parse Error - Text could not be parsed as JSON.
- Load
ApiKey Error - The API key could not be loaded.
- Load
Setting Error - A required setting could not be loaded.
- NoContent
Generated Error - The provider produced no content.
- NoSuch
Model Error - The requested model does not exist or the provider has no models of that kind.
- NoSuch
Provider Reference Error - A provider reference has no entry for the provider that received it.
- TooMany
Embedding Values ForCall Error - Too many values were passed to a single embedding call.
- Type
Validation Context - Where a validated value came from, for error messages.
- Type
Validation Error - A value failed schema or type validation.
- Unsupported
Functionality Error - The provider or model does not support the requested functionality.
Enums§
- Model
Kind - Kinds of models a provider can expose.
- Provider
Error - Error returned by provider adapters.
Functions§
- default_
retryable - Returns the default retry classification for an HTTP status.
Type Aliases§
- BoxError
- Boxed dynamic error used for causes and for
ProviderError::Other.