Represents an error returned by the TypeSafe API or the client itself.
Fields
:status— HTTP status code (e.g.401,422,429,529),:transportfor network-level errors before a response is received,:validationfor a request rejected locally before it is sent, or:invalid_responsewhen a successful HTTP response has an unexpected body.:message— Human-readable description of the error.:body— Raw response body (if available), useful for inspecting validation details.:request_id— The TypeSafe request ID fromx-typesafe-request-id, if the server sent one.
Common status codes
| Status | Meaning |
|---|---|
401 | Missing or invalid API key. |
422 | Request body failed validation (missing field, malformed question, etc). |
429 | Rate limit exceeded. Retried automatically with exponential backoff. |
529 | TypeSafe temporarily overloaded. Retried automatically. |
Summary
Types
@type status() :: pos_integer() | :transport | :validation | :invalid_response