class

Anthropic::APIError

Inherits Anthropic::Error < Exception < Reference < Object

Constructors

from_response(response : HTTP::Client::Response) : APIError
Source
new(status_code : Int32, error_type : String, error_message : String, request_id : String | Nil = nil)
Source

Instance methods

error_message
Source
error_type
Source
request_id

Request ID extracted from HTTP response headers (request-id or x-request-id).

Source
status_code
Source