Base exception for all Claude Agent SDK errors.
This provides a common error type for catch-all handling and for wrapping lower-level errors with SDK-specific context.
Fields
:message- Human-readable error description:cause- Underlying error that caused this exception (optional)
Examples
# Simple error
raise ClaudeAgentSDK.Errors.ClaudeSDKError, message: "Something went wrong"
# Wrapping another error
%ClaudeAgentSDK.Errors.ClaudeSDKError{
message: "Failed to process response",
cause: original_error
}
Summary
Types
@type t() :: %ClaudeAgentSDK.Errors.ClaudeSDKError{ __exception__: true, cause: Exception.t() | term() | nil, message: String.t() }