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

# Error

> Format respons error dan kode yang dikembalikan API GOWA.

Error menggunakan struktur respons standar dengan kode selain `SUCCESS`:

```json theme={null}
{
  "code": "VALIDATION_ERROR",
  "message": "phone: cannot be blank."
}
```

Tentukan percabangan berdasarkan status HTTP dan `code`, bukan `message`.

| HTTP | Kode |
| - | - |
| 400 | `VALIDATION_ERROR`, `INVALID_JID`, `ALREADY_LOGGED_IN`, `DEVICE_ID_REQUIRED` |
| 401 | `AUTHENTICATION_ERROR` (perangkat belum login); juga kegagalan Basic Auth (tanpa `code` JSON) |
| 403 | `AVATAR_HIDDEN`, `CROSS_SITE_REQUEST_BLOCKED` |
| 404 | `NOT_FOUND`, `DEVICE_NOT_FOUND`, `AVATAR_NOT_SET` |
| 408 | `CONTEXT_ERROR` |
| 429 | `WA_REACHOUT_TIMELOCK` |
| 500 | `INTERNAL_SERVER_ERROR`, `QR_CHANNEL_ERROR`, `SESSION_SAVED_ERROR`, `UPLOAD_MEDIA_ERROR`, `WEBHOOK_ERROR`, `INVALID_WA_CLI` |
| 503 | `DEVICE_MANAGER_UNAVAILABLE` |
| 504 | `GATEWAY_TIMEOUT` |

Arti kode, solusi, dan panduan percobaan ulang: [Penanganan error](https://gowaoss.mintlify.site/id/advanced/error-handling.md).

Pada `GET /user/avatar`, `AVATAR_NOT_SET` berarti kontak tidak memiliki foto profil. `AVATAR_HIDDEN` berarti pengaturan privasi menolak akses. Pertahankan gambar yang sudah di-cache saat akses ditolak karena privasi, dan bedakan kode ini dari error pemilihan perangkat.


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