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

# error

客户端或服务端处理失败时发送。大多数错误都可恢复，不会导致会话关闭。

## 事件字段

**error** `object` *required*

错误详情。

**error.message** `string` *required*

便于用户理解的错误消息。

**error.type** `string` *required*

错误类型，例如 `invalid_request_error` 或 `server_error`。

**error.code** `string`

机器可读的错误代码（如有）。

**error.event\_id** `string`

导致错误的客户端事件 ID（如适用）。

**error.param** `string`

与错误相关的请求参数（如适用）。

**event\_id** `string` *required*

由服务端生成的唯一事件 ID。

**type** `string` *required*

事件类型。必须为 `error`。

```json error theme={null}
{
  "event_id": "evt_error_001",
  "type": "error",
  "error": {
    "message": "The 'type' field is missing.",
    "type": "invalid_request_error",
    "code": "invalid_event",
    "event_id": "evt_session_update_001"
  }
}
```


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