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

# Errors and limits

> What a failed request returns, and what to do about it.

A failed request returns a status, a message you can show someone, and a code you can rely on. `details` is there when Adside has more to say, such as the fields that failed validation.

```json theme={null}
{
  "error": "This costs $0.40 and your organization has $0.10 of credit left.",
  "code": "INSUFFICIENT_CREDITS",
  "details": { "priceUsd": ["0.40"], "balanceUsd": ["0.10"] }
}
```

The CLI prints the same status, code and message.

## Codes

| Status | Code | What it means | What to do |
| - | - | - | - |
| 400 | `VALIDATION_ERROR` | The input is not valid | Fix the fields named in `details` |
| 401 | `UNAUTHORIZED` | You are not logged in, your login ended, or the API key is invalid, deleted or expired | Run `adside login`, or create a new key |
| 402 | `INSUFFICIENT_CREDITS` | Your organization does not have enough credit for this | Add credit, then retry |
| 402 | `BUDGET_EXCEEDED` | This task has spent its media budget | Finish with what exists |
| 403 | `FORBIDDEN` | Your role does not allow this, the API key is read only, or it belongs to another organization | Ask an Owner or Admin, or use a key that can write |
| 404 | `NOT_FOUND` | It does not exist, or you cannot see it | Check the ID and the workspace |
| 409 | `CONFLICT` | It clashes with the current state | Read the message, then retry |
| 409 | `SET_BUSY` | This creative drop is processing another request | Wait for the run in `activeRunId` |
| 413 | `PAYLOAD_TOO_LARGE` | The request is too big | Send less, or upload the file |
| 422 | `PROVIDER_ERROR` | The ad platform refused the request | Read the message: it comes from the platform |
| 422 | `PROVIDER_WRITE_NOT_APPLIED` | Nothing reached the ad platform | Fix the cause and retry |
| 429 | `RATE_LIMITED` | Too many requests for this feature | Wait for `Retry-After`, when it is sent |
| 500 | `INTERNAL_ERROR` | Something failed on Adside's side | Retry, then write to [support@adside.ai](mailto:support@adside.ai) |
| 502 | `UPSTREAM_UNAVAILABLE` | A service Adside relies on did not answer | Retry later |
| 503 | `SERVICE_UNAVAILABLE` | This is not available right now | Retry later |

Other codes can appear for specific features. Rely on the status when you do not recognize a code.

> [!NOTE]
>
> After a `5xx` on a change, check whether it landed before you retry.

## Limits

Adside does not publish an overall request limit. Some features limit how often you can call them, and they answer `429` with `RATE_LIMITED`. `Retry-After` gives the seconds to wait when Adside knows them.

Ad platforms apply their own limits on top. When one of them refuses a call, you get its message as a `PROVIDER_ERROR`.


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