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

# 错误码

> BlockDB 的业务错误码与 gRPC 状态码映射。

# 错误码

BlockDB 返回业务错误码 `BizErrorCode`，并映射到标准的 gRPC 状态码。

| 业务错误码 | 含义 | 对应 gRPC 状态 |
| - | - | - |
| `BIZ_ERROR_CODE_INVALID_ARGUMENT` | 参数非法 | `InvalidArgument` |
| `BIZ_ERROR_CODE_NOT_FOUND` | 未找到 | `NotFound` |
| `BIZ_ERROR_CODE_QUERY_REJECTED` | 查询被拒绝 | `FailedPrecondition` |
| `BIZ_ERROR_CODE_QUEUE_OVERLOAD` | 写入队列过载 | `ResourceExhausted` |
| `BIZ_ERROR_CODE_WRITE_CONFLICT` | 写入冲突 | `Aborted` |
| `BIZ_ERROR_CODE_INTERNAL` | 内部错误 | `Internal` |

<Note>
  值为 0 的 `BIZ_ERROR_CODE_UNSPECIFIED` 表示未指定错误码，通常不单独使用。
</Note>

## 处理建议

* **`INVALID_ARGUMENT`**：检查请求字段是否合法（表名、主键、条件等）。
* **`NOT_FOUND`**：读取不存在的行时返回，业务上按空结果处理。
* **`QUEUE_OVERLOAD`**：写入队列满，可稍后重试或改用异步写入。
* **`WRITE_CONFLICT`**：条件更新发生冲突，业务侧决定是否重试。


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