Skip to main content

Module errors

Module errors 

Source
Expand description

Error types for the Claude Agent SDK

This module provides a comprehensive error handling system with:

  • Error categories for classification
  • Error codes for machine-readable identification
  • Retryable detection for transient errors
  • HTTP status code mapping for API responses

Structs§

CliNotFoundError
Error when Claude Code CLI cannot be found
ConnectionError
Error when connecting to Claude Code CLI
ErrorContext
Detailed error context for logging and debugging.
ImageValidationError
Image validation error
JsonDecodeError
Error when JSON decoding fails
MessageParseError
Error when message parsing fails
ProcessError
Error when the CLI process fails

Enums§

ClaudeError
Main error type for the Claude Agent SDK
ErrorCategory
Error category for classifying errors by their source and nature.
HttpStatus
HTTP status code mapping for errors.

Type Aliases§

Result
Result type for the Claude Agent SDK