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_code": "9000",
"error_type": "validation",
"error_message": "name: ensure this value has at most 50 characters. parameters.credentials.access_key: field required.",
"error_details": {
"name": [
"ensure this value has at most 50 characters"
],
"parameters.credentials.access_key": [
"field required"
],
}
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
{
"error_code": "111",
"error_type": "auth",
"error_message": "Authorization is required.",
"error_details": {}
}
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.200-2xx
OKEverything worked as expected
400
Bad RequestSince 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.
In any case, you can get the error reason from
error_message
attribute. See the How to get error reason above.401
Unauthorized402
No API calls left403
ForbiddenThe API key doesn't have permissions to perform the request. We recommend checking the scopes and correctness of the API key.
404
Not FoundThe requested resource doesn't exist.
409
ConflictThe request can't be processed, because of conflict in the current state of the resource.
422
Unprocessable EntityThe 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 Requests500
Internal Server ErrorTemporary error, which indicates that we experiencing an internal error.
This is a rare case but if you continue to receive this error, please reach out to API support with request details.
In case of any issues with image processing, you can reach out to our technical support and provide them details with
x-request-id
header value (see the API reference).
Last modified 1mo ago