> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lerian.studio/llms.txt
> Use this file to discover all available pages before exploring further.

# Cabine API error list

> The Cabine API returns structured error responses. Look up each DESK error code, what it means, and the HTTP status it carries.

**Error format**

The Cabine API returns errors as RFC 9457 problem details with the `application/problem+json` media type:

```json JSON theme={null}
{
  "code": "DESK-0003",
  "correlationId": "req-7a3f9c2e",
  "detail": "handoff approver must differ from its owner and submitter",
  "status": 403,
  "title": "Forbidden",
  "type": "https://errors.lerian.studio/v1/DESK-0003"
}
```

**Field definitions**

* **`type`** – A URI that identifies the error in the Lerian error catalog, built as `https://errors.lerian.studio/v1/<code>`.
* **`title`** – The HTTP status text (for example, `Forbidden`).
* **`status`** – The HTTP status code.
* **`detail`** – A human-readable explanation of this occurrence.
* **`code`** – A stable identifier for the error (`DESK-NNNN`). Branch on this field. Each code has one status class.
* **`correlationId`** – The request identifier. It repeats the `X-Request-ID` header of the request. If the request has no valid one, the Cabine API generates one.
* **`errors`** – Optional list of individual error details, each with a `location`, a `message`, and a `value`.

Refusals from the authorization check and from routing (`401`, `403`, `404`, `405`, `503`, `504`) carry `instance`, `traceId` and an empty `violations` list instead of `errors`.

## Errors

| `code` | Description | Status |
| - | - | - |
| DESK-0001 | Unprocessable Entity. The request as sent is not one the Cabine API acts on: a field fails validation, or a decision value is not `approved` or `rejected`. Requests that cannot be read (`400`), use a method the route does not accept (`405`), or carry a body larger than 1 MiB (`413`) carry this code too. | 422, 400, 405, 413, other 4xx |
| DESK-0002 | Unauthorized. The request has no bearer token, the token is expired, invalid or unreadable, or the token names no principal. Present a valid token. | 401 |
| DESK-0003 | Forbidden. The caller is known and may not do this. Access Manager refused the permission, the token is not a user token where the operation needs one, or the four-eyes rule applies. For the four-eyes rule, a different person must act. | 403 |
| DESK-0004 | Not Found. No record answers the identifier: no shift handoff, no operation approval, or no pending user deletion for the user. A route the service does not have also answers this code. | 404 |
| DESK-0005 | Conflict. The record exists, and its state does not allow the operation. An operation approval or a user deletion is already pending for the same subject, or the request is no longer open for a decision. Read the current state first. A shift handoff is not in the state the step needs: submit takes a draft, and approve takes a submitted handoff. | 409 |
| DESK-0006 | Gone. The operation approval passed its decision deadline. Propose the operation again. | 410 |
| DESK-0007 | Internal Server Error. The Cabine API failed. The same code covers any other server-side status that has no code of its own. | 500 |
| DESK-0008 | Bad Gateway. The checker approved a user deletion, and Access Manager did not carry out the deletion. The request is stored as failed. Retry the approval. If the retry fails again, check the Cabine API settings for Access Manager. | 502 |
| DESK-0009 | Service Unavailable or Gateway Timeout. The Cabine API could not get an authorization decision. Access Manager did not answer (`503`), or did not answer in time (`504`). Or `PLUGIN_AUTH_ENABLED` is `true` and `PLUGIN_AUTH_ADDRESS` is empty (`503`). The caller is neither granted nor refused. If Access Manager did not answer, try again later. If every request answers this code, check `PLUGIN_AUTH_ADDRESS`. | 503, 504 |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.