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

# Errors

> HTTP status codes and how to show errors to users.

| HTTP | When |
| - | - |
| `400` | Missing or invalid field, unknown `action` (`action not found`), terminal problem, insufficient balance |
| `401` | Not logged in, token expired (`Expired JWT Token`), bad credentials. [Refresh](https://docs.tunimobile.com/api/auth/refresh.md) or log in again. |
| `403` | Account disabled; or `access_denied` on reprint, duplicate or confirm-reprint for a voucher that belongs to another terminal or shop |
| `404` | Voucher, terminal, session or user not found; voucher out of stock |
| `500` | Server error. Retry later; contact support if it persists. |

See [Requests and responses](https://docs.tunimobile.com/basics/requests-and-responses.md#response-format) for the error envelope.

## Showing errors to users

Show `error.details` to the user only when it is a sentence (for example `Solde de la boutique insuffisant`). Map the code-style values (`voucher_not_found`, `access_denied`, `something_went_wrong`) to your own messages.


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