Anthropic::APIError
Base error class for all Anthropic API errors
error_type reflects the error.type field from the API's error payload
(e.g., "invalid_request_error", "rate_limit_error", "overloaded_error",
"billing_error"). It is populated whenever the response body parses as
JSON and carries a nested error.type.
Constructors
Instance methods
body
Sourceerror_type
Sourceheaders
Sourcerequest_id
Request ID echoed by the API in the request-id response
header. Include it when reporting failures to Anthropic support.
status
Sourceworkspace_id
Workspace ID echoed by the API in the anthropic-workspace-id
response header, when the request ran under a Workspace.