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

# 错误

> 错误响应格式和返还的 GOWA API。

错误使用非`SUCCESS`代码的标准信封：

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

在 HTTP 状态和 `code` 上的分支，而不是 `message` 上的分支。

| HTTP | 代码 |
| - | - |
| 400 | `VALIDATION_ERROR`, `INVALID_JID`, `ALREADY_LOGGED_IN`, `DEVICE_ID_REQUIRED` |
| 401 | `AUTHENTICATION_ERROR` (设备未登录)；还有基本认证故障(没有 JSON `code` ) |
| 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` |

含义、修复和重试指南：[错误处理](https://gowa-docs.mintlify.site/zh/advanced/error-handling.md)。

因为`GET /user/avatar`, `AVATAR_NOT_SET` 是指联系人没有个人资料图片。`AVATAR_HIDDEN` 是指隐私设置拒绝访问。 在拒绝隐私时保留缓存的图片，并区分这些代码和设备选择错误。


## Related topics

- [错误处理](https://gowa-docs.mintlify.site/zh/advanced/error-handling.md)
- [多设备与设备选择](https://gowa-docs.mintlify.site/zh/concepts/multidevice.md)
- [聊天woot 集成](https://gowa-docs.mintlify.site/zh/integrations/chatwoot.md)
- [离开组](https://gowa-docs.mintlify.site/zh/api-reference/group/离开组.md)
- [列出设备的实时更新订阅](https://gowa-docs.mintlify.site/zh/api-reference/newsletter/列出设备的实时更新订阅.md)


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