class

Arcana::AI::APIError

Inherits Arcana::AI::Error < Exception < Reference < Object

Constructors

from(response : HTTP::Client::Response, body : String, provider : String) : self

Build from a failed HTTP response, keeping the retry hint.

Source
new(status_code : Int32, response_body : String, provider : String, retry_after : Time::Span | Nil)
Source
new(status_code : Int32, response_body : String, provider : String = "unknown")
Source

Instance methods

response_body
Source
retry_after

How long the provider asked us to wait before trying again, from Retry-After / retry-after-ms or a retry delay in the body.

Source
status_code
Source