Error response structure
All error responses from the Smartling API, i.e., responses with HTTP status code in ranges 4xx or 5xx, contain a body with the following JSON structure:
{
"response": {
"code": "ERROR_CODE",
"errors": [
{
"key": "error.key",
"message": "Error message",
"details": {
"field":"value"
}
}
]
}
}
The possible values for code are listed below. The errors node contains at least one error object which should have enough information to identify the reason for the error. In some cases, the error object’s details node is empty and set to null. The value of the key node might be needed if working with Smartling support to investigate the error.
For additional information on error handling, see Error Handling.
Success codes
Possible values for the code node in the response to a successful API request are shown in the table below, underneath the associated HTTP status code.
200 OK
| Response Code | Possible Causes |
| SUCCESS |
|
202 Accepted
| Response Code | Possible Causes |
| SUCCESS |
|
Error codes
Possible values for the code node in the response to a unsuccessful API request are shown in the table below, underneath the associated HTTP status code.
400 Bad Request
| Response Code | Possible Causes |
| VALIDATION_ERROR |
|
401 Unauthorized
| Response Code | Possible Causes |
| AUTHENTICATION_ERROR |
|
403 Forbidden
| Response Code | Possible Causes |
| AUTHORIZATION_ERROR |
|
404 Not Found
| Response Code | Possible Causes |
| GENERAL_ERROR |
|
| VALIDATION_ERROR |
|
| NOT_FOUND_ERROR |
|
423 Locked
| Response Code | Possible Causes |
| RESOURCE_LOCKED |
|
429 Too Many Requests
| Response Code | Possible Causes |
| MAX_OPERATIONS_LIMIT_EXCEEDED |
|
500 Internal Server Error
| Response Code | Possible Causes |
| GENERAL_ERROR |
|
503 Forbidden
| Response Code | Possible Causes |
| MAINTENANCE_MODE_ERROR |
|