Errors

LocaleUI.com uses standardized HTTP status codes to indicate the success or failure of a request.

Successful requests result in codes in the 2xx range, while client errors are signaled with 4xx codes.

Error responses are returned in JSON format and contain detailed information such as missing, invalid or unauthorized parameters.

Error response example

      
GET /api/v1/projects/[Invalid project ID] 404 Not found
{ "message": "Cannot find record", "detail": "Couldn't find Project with ..." }

The displayed API response shows the error when calling the project endpoint with valid authentication but invalid project ID.

Error codes

The API returns standardized error messages that contain the error code and a description of the error. Here are some common error codes:

Status
Description
400
Bad Request
The request was invalid or malformed. This can happen if required parameters are missing or invalid.
401
Unauthorized
The request requires authentication or the provided API key is invalid.
403
Forbidden
The request was valid, but the user does not have permission to access the requested resource.
404
Not Found
The requested resource was not found. This can happen if the resource does not exist or the URL is incorrect.
500
Internal Server Error
An unexpected error occurred on the server. This can happen if there is a bug in the API or if the server is overloaded.