Learn how Lokalise Vantage API errors are structured and how to handle single and multiple error responses.
The Lokalise Vantage API returns errors in a consistent JSON format across all endpoints and HTTP status codes.
Each error contains:
message— a human-readable description of the error.code— an error-specific code that can be used programmatically.details— optional additional information that can help identify the cause of the error.
Single errors
When a request produces a single error, the error object is returned directly at the response root:
{
"message": "The requested resource was not found.",
"code": "resource_not_found"
}Some errors may also include the optional details object:
{
"message": "The request could not be processed.",
"code": "invalid_request",
"details": {
"field": "projectId"
}
}Multiple errors
When several errors are returned, for example during request validation, they are grouped under the root-level errors property:
{
"errors": [
{
"message": "Invalid value.",
"code": "validation_error",
"details": {
"field": "name"
}
},
{
"message": "Invalid value.",
"code": "validation_error",
"details": {
"field": "language"
}
}
]
}Each object in the errors array uses the same error structure as a single error.
API clients should therefore handle both possible response shapes:
Single error:
{
"message": "...",
"code": "...",
"details": { ... }
}
Multiple errors:
{
"errors": [
{
"message": "...",
"code": "...",
"details": { ... }
}
]
}Use the HTTP status code to determine the general result of the request and the error code, message, and optional details fields to identify the specific cause.