A request that fails answers with a status of 400 or higher and an API Problem (RFC 9457), with the content type application/problem+json:
{
"type": "https://docs.continuous-translations.com/api/errors#not_found",
"title": "Not Found",
"status": 404,
"error": "not_found"
}| Member | Description |
|---|---|
type | A URL that identifies the problem. It ends with the error code. |
title | The name of the HTTP status. It does not change per request. |
status | The HTTP status, the same as the status of the response. |
error | A code to act on, not a sentence. The codes are below and on the page of each route. |
A problem can carry more members, such as fields for validation errors. See Languages and time zones.
Match on error: it stays the same, while title and the text of type are for people. The responses of versions before this format had only error and the extra members, and those are still there.
Validation errors #
A field that is missing or wrong answers 422 with invalid_request, and fields says which fields and why:
{
"type": "https://docs.continuous-translations.com/api/errors#invalid_request",
"title": "Unprocessable Content",
"status": 422,
"error": "invalid_request",
"fields": { "name": "invalid" }
}The value in fields is invalid for most problems. Some routes give a more precise reason, such as too_short, taken or is_source_language. Each endpoint page lists the ones it can give.
Common codes #
| Status | error | Meaning |
|---|---|---|
| 400 | invalid_state | The state of a GitHub or GitLab connection is not the one you were given |
| 401 | unauthenticated | The token is missing, not valid or expired |
| 401 | invalid_credentials | The email address or password is wrong |
| 402 | plan_limit | The plan of the organisation has no room for this. limit, plan and max say which limit |
| 403 | forbidden | Your role does not allow this |
| 403 | insufficient_scope | The API key has no scope for this route, see Authentication |
| 401 | mfa_required | The account uses two-factor authentication and no code was sent |
| 401 | invalid_code | The two-factor code is wrong or was used already |
| 403 | ip_not_allowed | The organisation has an IP allowlist and the address of the request is not on it |
| 403 | mfa_setup_required | The organisation requires two-factor authentication and your account has none. Set it up first |
| 403 | wrong_password | The password you sent is not the password of the account |
| 404 | not_found | The route does not exist, the item does not exist, you cannot see it, or an id in the path is not a UUID |
| 405 | method_not_allowed | The route exists, but not for this HTTP method. The Allow header lists the methods |
| 409 | conflict | It already exists |
| 409 | project_frozen | The project is frozen, so keys cannot change |
| 409 | branch_frozen | The branch is frozen |
| 409 | branch_protected | The branch is the protected main branch |
| 410 | invalid_or_expired_token | The link from an invitation or password reset is unknown or has expired |
| 422 | invalid_request | A field is missing or wrong, see fields |
| 429 | rate_limited | Too many requests, see Rate limiting |
| 500 | server_error | Something went wrong on our side |
| 502 | github_error, gitlab_error | GitHub or GitLab refused a request. message says why |
| 503 | github_not_configured, gitlab_not_configured | The integration is not set up on this server |
A route can give other codes of its own, such as not_in_review or owner_cannot_change. They are listed on the page of that route.
Not found and forbidden #
The API answers 404 and not 403 for a project, branch or key you have no access to, so it does not reveal that it exists. 403 means you can see it but your role is too low.