Errors
The page provides the description of expected errors of Claid API and guidance how to handle them.
The Claid API provides standard HTTP status codes. Every successful responses are indicated with a 200-series and error responses with non-200-series HTTP code.
Error reasons can vary, but the structure of the response always looks the following:
Error response structure
Error response attributes:
error_code
string Claid internal error identifier.error_type
string Claid errors are grouped by topics and this field returns the name of that group.error_message
string A human-readable description of the error. If there were several reasons for failure - they will be concatenated as separate sentences, divided with.
(dot).error_details
object If there is a request validation error withkey:value
pairs - this field represents a nicely formatted version oferror_message
. Otherwise it can be an empty object -{}
.
Error response example with an empty error_details
How to get error reason
If you want to get a human-readable error message, then it is best to always get data from the error_message
attribute.
If you prefer to represent the error yourself according to the key:value
pairs of errored fields, use error_details
. Note: It can be an empty object if there was no validation error associated with the field. In this case, you can get the message from the error_message
attribute.
HTTP status codes summary
200-2xx
OK
Everything worked as expected
400
Bad Request
Since this is a generic error, there can be several reasons why we get it, such as when we can't get the object from storage, or can't even parse JSON payload when it's invalid.
401
Unauthorized
402
No API calls left
403
Forbidden
The API key doesn't have permissions to perform the request. We recommend checking the scopes and correctness of the API key.
404
Not Found
The requested resource doesn't exist.
409
Conflict
The request can't be processed, because of conflict in the current state of the resource.
422
Unprocessable Entity
The error indicates that the payload has logical or validation issues. The concrete reasons can be found in error_message
and error_details
fields.
429
Too Many Requests
500
Internal Server Error
Temporary error, which indicates that we experiencing an internal error.
Get help
Last updated