Claudio.APIError exception (Claudio v0.5.0)
View SourceException raised when the Anthropic API returns an error response.
Summary
Functions
Creates a new APIError from an HTTP error response.
Types
@type error_type() ::
:invalid_request_error
| :authentication_error
| :permission_error
| :not_found_error
| :rate_limit_error
| :api_error
| :overloaded_error
@type t() :: %Claudio.APIError{ __exception__: true, message: String.t(), raw_body: map() | nil, status_code: integer(), type: error_type() | String.t() }
Functions
Creates a new APIError from an HTTP error response.
Handles both plain maps (non-streaming responses) and structs like
Req.Response.Async (streaming error responses).