Expand description
The SDK’s error types.
Each error is a struct with its own message text. Error wraps them, one variant per type, so
callers can branch with match and still reach the type’s fields.
Structs§
- Context
Window Overflow Error - The combined input exceeded the model’s context window (
ContextWindowOverflowError). - Default
NotConfigured Error - A default value was read before one was configured (
DefaultNotConfiguredError). - Json
Validation Error - A value contains data that cannot be serialized to JSON (
JsonValidationError). - MaxTokens
Error - The model stopped because it reached its output token limit (
MaxTokensError). - Model
Error - A model provider failed (
ModelError), the base of the model error family. - Model
Network Error - The network connection to the model provider failed (
ModelNetworkError). - Model
Throttled Error - The provider throttled or rate limited the request (
ModelThrottledError). - Sandbox
Abort Error - Sandbox execution was aborted through its cancel signal (
SandboxAbortError). - Sandbox
IsADirectory Error - A sandbox path is a directory where a file was expected (
SandboxIsADirectoryError, codeEISDIR). - Sandbox
Path NotFound Error - A sandbox path does not exist (
SandboxPathNotFoundError, codeENOENT). - Sandbox
Permission Error - A sandbox file, or a directory above it, is not accessible (
SandboxPermissionError, codeEACCES). - Sandbox
Timeout Error - Sandbox execution exceeded its timeout (
SandboxTimeoutError). - Session
Error - A session operation failed (
SessionError), such as reading or restoring session data. - Storage
Error - A storage operation failed (
StorageError), whatever the backend. - Structured
Output Error - The model failed to produce structured output (
StructuredOutputError). - Tool
NotFound Error - No registered tool matches the requested name (
ToolNotFoundError). - Tool
Validation Error - A tool failed validation during registration (
ToolValidationError).
Enums§
- Error
- Every error the SDK returns.