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

# Error dan rate limit

> Pahami format error, validation error, quota, dan rate limit API Wator.

API Wator memakai response error JSON dengan field `message`. Beberapa error juga memiliki field `code`.

<Note>
  Coba request langsung di [API Playground](https://api.wator.id/v1/docs).
</Note>

## Status umum

| Status | Arti                                                        |
| ------ | ----------------------------------------------------------- |
| `400`  | Request tidak valid, body salah, atau parameter kurang.     |
| `401`  | API key tidak ada atau tidak valid.                         |
| `403`  | API key tidak memiliki izin yang dibutuhkan.                |
| `404`  | Resource tidak ditemukan.                                   |
| `422`  | Request valid, tetapi tidak bisa diproses.                  |
| `429`  | Rate limit terlewati.                                       |
| `500`  | Terjadi gangguan layanan. Coba lagi beberapa saat kemudian. |

## Missing API key

Jika header `X-API-Key` tidak dikirim, API mengembalikan `401`.

```json theme={null}
{
  "message": "Missing API key. Provide it via X-API-Key header"
}
```

## Rate limit

Jika rate limit terlewati, API mengembalikan `429`.

```json theme={null}
{
  "code": "rate_limit_exceeded",
  "message": "Rate limit exceeded, please try again later"
}
```

Response juga menyertakan header `Retry-After`.

## Quota paket

Dashboard dan API dapat mengembalikan quota error saat limit paket terlewati.

```json theme={null}
{
  "Code": "quota_exceeded",
  "Message": "Quota exceeded",
  "Quota": {
    "type": "devices",
    "used": 1,
    "limit": 1
  }
}
```

Upgrade paket atau tambah add-on untuk menaikkan limit.
