# Errors

The Auvo API returns standard HTTP codes with `{ "error": "<message>" }`.

## Quick map

| Code | Meaning | Action |
|  --- | --- | --- |
| 400 | Invalid payload | Check schema/types before retrying. |
| 401 | Missing/expired token | Renew via `POST /login`. |
| 403 | Rate limit exceeded | Apply exponential backoff. |
| 404 | Resource missing | Verify `id`/slug. |
| 409 | Conflict (e.g. duplicate) | Check remote state first. |
| 415 | Missing `Content-Type` on POST | Send `application/json`. |
| 422 | Semantic validation | Read `error` and fix. |
| 429 | Rate limit (future reserve) | Treat like 403. |
| 500 | Internal failure | Report to help@auvo.com.br with `deliveryId`/timestamp. |


## Envelope


```json
{ "error": "The field 'email' is not a valid email address" }
```

## Retry strategy

- **Idempotent (`GET`, `PUT`, `DELETE`)**: retry with backoff on 5xx and 403.
- **Non-idempotent (`POST`, `PATCH`)**: avoid blind retries — use correlation
(e.g. `externalId`) to detect duplicates before resubmitting.


## Troubleshooting

1. Capture `X-Request-Id` (when present) in logs.
2. Reproduce via curl before reporting — removes HTTP-client variables.
3. Attach a redacted payload when opening a ticket.