REST API

Error Codes

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
  • Request was processed successfully; results contained within the data node of the response.

 

202 Accepted

Response Code Possible Causes
SUCCESS
  • Processing of uploaded file did not complete within 60 seconds and will continue to be processed asynchronously.

 

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
  • Invalid content or parameters sent by client
  • Item being accessed no longer exists
  • Incorrect HTTP method used

 

401 Unauthorized

Response Code Possible Causes
AUTHENTICATION_ERROR
  • Invalid credentials sent to Authenticate endpoint
  • Expired access token
  • Incorrect use of authentication API

 

403 Forbidden

Response Code Possible Causes
AUTHORIZATION_ERROR
  • Invalid API URI
  • User has no permissions

 

404 Not Found

Response Code Possible Causes
GENERAL_ERROR
  • Invalid API path
VALIDATION_ERROR
  • Incorrect project ID specified in URI
NOT_FOUND_ERROR
  • Invalid API path root (API name or version)
  • Service outage (rare)

 

423 Locked

Response Code Possible Causes
RESOURCE_LOCKED
  • The requested file is currently being processed by another operation. The file will be unlocked after that operation completes.

 

429 Too Many Requests

Response Code Possible Causes
MAX_OPERATIONS_LIMIT_EXCEEDED
  • Rate limit exceeded. See Rate Limits for more information.

 

500 Internal Server Error

Response Code Possible Causes
GENERAL_ERROR
  • An unexpected error occurred during request processing.
  • An invalid regular expression was used in a placeholder directive.

 

503 Forbidden

Response Code Possible Causes
MAINTENANCE_MODE_ERROR
  • Smartling has entered maintenance mode, all API services will return this error. After exiting maintenance mode, all services should return to normal.

 

 

 

Was this article helpful?