ClaudeAgentSDK.AssistantError (claude_agent_sdk v0.6.9)

View Source

Enumerates assistant-level error codes surfaced by the Claude CLI.

Mirrors the Python SDK enum to keep client handling consistent.

Summary

Functions

Casts a string/atom error value into the assistant error enum.

Returns the list of supported assistant error codes.

Types

t()

@type t() ::
  :authentication_failed
  | :billing_error
  | :rate_limit
  | :invalid_request
  | :server_error
  | :unknown

Functions

cast(error)

@spec cast(String.t() | atom() | nil) :: t() | nil

Casts a string/atom error value into the assistant error enum.

Returns nil when no error is present, and :unknown when the value is present but not recognized.

values()

@spec values() :: [t()]

Returns the list of supported assistant error codes.