Why a call failed. Returned as {:error, %TypeSafe.Error{}}, raised by the bang
functions.
reason is one of:
:no_api_key- no key was given andTYPESAFE_API_KEYis unset; no request was made:bad_request(400),:authentication(401),:permission_denied(403),:not_found(404),:unprocessable_entity(422),:rate_limited(429),:overloaded(529),:server_error(other 5xx),:http_error(anything else):timeout,:connection- no HTTP response:invalid_response- a 2xx whose body is missing a required field;messagenames the field
request_id is the x-typesafe-request-id header, when there was a response.
Summary
Types
@type reason() ::
:no_api_key
| :bad_request
| :authentication
| :permission_denied
| :not_found
| :unprocessable_entity
| :rate_limited
| :overloaded
| :server_error
| :http_error
| :timeout
| :connection
| :invalid_response
@type t() :: %TypeSafe.Error{ __exception__: term(), body: term(), message: String.t(), reason: reason(), request_id: String.t() | nil, retry_after_ms: non_neg_integer() | nil, status: pos_integer() | nil }