Errors
Every error has the same shape, with a type you can switch on.
{
"error": {
"type": "invalid_request",
"message": "email must be a valid email address",
"param": "email",
"request_id": "req_8Ty3Ui0P"
}
}Prop
Type
| Status | Type | What to do |
|---|---|---|
| 400, 422 | invalid_request | Fix the request. Retrying won't help. |
| 401 | authentication_error | Check the API key and environment. |
| 404 | not_found | Check the ID. Test and live objects are separate. |
| 409 | conflict | The object is in the wrong state for this action. |
| 429 | rate_limited | Wait for Retry-After, then retry. |
| 500 | api_error | Retry with the same idempotency key. |
How is this guide?