> ## Documentation Index
> Fetch the complete documentation index at: https://help.ship.uniuni.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 错误处理

> 了解合作伙伴API的响应格式和错误代码

所有合作伙伴API响应使用统一的信封格式。

## 响应信封

### 成功

```json theme={null}
{
  "success": true,
  "message": "...",
  "data": {}
}
```

### 错误

```json theme={null}
{
  "success": false,
  "message": "Error description",
  "errorCode": "ERROR_CODE"
}
```

| 字段          | 类型      | 描述                     |
| ----------- | ------- | ---------------------- |
| `success`   | boolean | `true`表示成功，`false`表示错误 |
| `message`   | string  | 人类可读的状态或错误描述           |
| `data`      | object  | 成功时的响应载荷               |
| `errorCode` | string  | 机器可读的错误代码（错误时存在）       |

## HTTP状态码

| 状态码   | 含义                |
| ----- | ----------------- |
| `200` | 请求成功              |
| `400` | 错误请求——参数无效或缺失     |
| `401` | 未授权——令牌缺失、已过期或无效  |
| `404` | 资源未找到（例如，追踪ID不存在） |
| `500` | 内部服务器错误           |
