v2 returns every error in one format, with a stable code you can handle in code and a readable message:
{
"errors": [
{ "code": "resource_not_found", "message": "The requested resource does not exist." }
]
}Use the HTTP status first, then the code. The most common ones:
| HTTP status | Code | When you see it |
|---|---|---|
400 | parameter_not_found | A required field is missing or blank |
400 | parameter_invalid | A value is not valid, for example an unknown provider_id when fetching slots |
400 | out_of_range | A range or count is outside what is allowed, for example a slots range over 7 days |
401 | missing_authorization, token_expired | No bearer token was sent, or it has expired |
403 | action_forbidden | The action isn't allowed for this account |
404 | resource_not_found | The id does not exist, for example when deleting an unknown service |
409 | resource_conflict | The request conflicts with the current state, for example a duplicate category title |
413 | payload_too_large | A value is larger than allowed |
429 | You are sending requests too quickly. Slow down and retry. | |
500 | server_error | Something went wrong on our side |
The full list of error codes is in the Getting Started section at the top of this page.