Errors
Possible errors may occur as a result of API calls in particular circumstances.
More peculiar errors are specified in the Response Status section of each API call.
Status
Following HTTP Status Code standard, following error statuses are categorized as follows:
- 4xx: Client Side errors, for which most of the responsibility is attributable to the client request.
- 5xx: Server Side errors, for which most of the responsibility is attributable to the server that wasn't able to respond as expected.
4xx
HTTP Code | Description | Body | Action |
---|---|---|---|
400 | Bad Request | ErrorsList | Check if parameters are correct and consistent. Look in the Response Body error details for more info. |
401 | Unauthorized | ErrorMessage | Check that the variable parts of the request (e.g. {x_api_key} , {jwt_bearer} ) are spelled correctly without any trailing spaces or undesired characters. |
403 | Forbidden | ErrorMessage | Such response is returned if the user does not have the permission to perform the call. Please check that the request is well-formed to request data expected to be authorized for. |
404 | Not Found | ErrorRouting | Check if endpoint path is correct. |
425 | Too Early | ErrorsList | The requested data is not yet ready. The Response Body will notify how long to wait until the data is ready. |
429 | Too Many Requests | ErrorMessage | One of the following limits has been exceeded: - requests per second: decrease the number of simultaneous requests. - requests per day: either wait until the next day or contact us to increase the limit. |
5xx
HTTP Code | Description | Body | Action |
---|---|---|---|
500 | Internal Server Error | ErrorsList | This is an unexpected error. Please verify if it keeps occurring when repeating the call. If so, please contact us. |
502 | Bad Gateway | This should be a temporary issue. Please try performing the same request again. |
|
503 | Service Unavailable | This should be a temporary issue. Please try performing the same request again. |
|
504 | Gateway Timeout | ErrorMessage | This error should occur after waiting longer than 30 seconds for a response. Please try performing the same request again. |
Body
In case of error, the Response Body may contain the following JSON objects which provide details about the occurred errors.
ErrorsList
Field | Description | Type |
---|---|---|
errors | List of errors occurred. | array[Error] |
Error
Field | Description | Type | Examples |
---|---|---|---|
code | Code which identifies the error occurred. | string | WRONG_TIMEFRAME INVALID_REQUEST INTERNAL_SERVER_ERROR |
error | Verbose explanation of the error code . |
string | 'from' must be less than equal 'to' This is the overall grouped, it needs a field on which to group. An error has occurred Property not ready, try again after 3 minutes. |
Example
{
"errors": [
{
"code": "INVALID_SENTIMENT_FILTER",
"error": "Only one filter on sentiment can be applied"
},
{
"code": "INVALID_LANGUAGE",
"error": "The requested language filter is not valid"
},
{
"code": "INVALID_PAGINATION_REQUEST",
"error": "The requested pagination filter is not valid"
}
]
}
ErrorMessage
Field | Description | Type | Examples |
---|---|---|---|
message | Verbose explanation of the error. | string | Unauthorized User is not authorized to access this resource with an explicit deny Endpoint request timed out |
Example
{
"message": "Endpoint request timed out"
}
ErrorRouting
Field | Description | Type | Examples |
---|---|---|---|
timestamp | String representing the error timestamp in yyyy-MM-ddTHH:mm:ss.SSSZZZZ format. |
string | 2021-07-05T07:47:26.857+0000 |
status | Response HTTP Status Code. | int | 404 |
error | Description of the error. | string | Not Found |
message | Message of the error. | string | Not Found |
path | Internal path affected by the error. | string | /licence/9999/XXeUNbmtYZTsH7UGvNfXWo/null/null |
Example
{
"timestamp": "2021-07-05T07:47:26.857+0000",
"status": 404,
"error": "Not Found",
"message": "Not Found",
"path": "/licence/9999/XXeUNbmtYZTsH7UGvNfXWo/null/null"
}