Skip to main content

Module errors

Module errors 

Source
Expand description

Error types for the Claude Code SDK.

This module defines all error types that can occur during SDK operations, including connection failures, process errors, JSON parsing errors, and message parsing errors.

Structs§

CLIConnectionError
Error establishing or maintaining a connection to the Claude Code CLI process.
CLIJSONDecodeError
Error decoding JSON from the CLI stdout stream.
CLINotFoundError
Error when the Claude Code CLI executable cannot be found.
ClaudeSDKError
General SDK error for validation and logic failures.
MessageParseError
Error parsing a JSON message into a typed Message.
ProcessError
Error from the Claude Code CLI subprocess execution.

Enums§

Error
Unified error type for all SDK operations.

Type Aliases§

Result
A specialized Result type for SDK operations.