Error reference
The API error format, the license_required code and its feature values, common error messages by category with HTTP status and fixes, and MCP errors.
Response format
On error the API returns the matching HTTP status and JSON:
{"error": "<message in Chinese>"}Endpoints that need Enterprise also return an error code and feature:
{"error": "此功能需要企业版授权", "code": "license_required", "feature": "asset_facts"}Apart from license_required, errors carry no separate code. Callers should rely on the HTTP status, and use the error message for display and troubleshooting. Messages are returned in Chinese; the tables below give the message as returned with its meaning in English.
license_required
HTTP 403. Values of feature:
| Feature | Covers |
|---|---|
sso | CAS, OIDC and SAML single sign-on |
feishu_directory | Feishu directory sync |
feishu_docs | Feishu docs: link detection, sync, search |
asset_facts | Asset facts, conflict checks, AI writing asset facts |
ai_review | AI review and the facts-need-review option on tokens |
audit | Audit log viewing and export |
Fix: activate an Enterprise licence that includes the feature. See Licence.
AI API
| Message | HTTP | Meaning | Fix |
|---|---|---|---|
| 缺少 Bearer Token | 401 | No Authorization: Bearer header | Add the token |
| Token 无效或已吊销 | 401 | The token is wrong, rotated or revoked | Check it under API tokens, and create or rotate one if needed, then update the configuration |
| Token 缺少权限: enrich | 403 | A read-only token called a write endpoint | Use a read and write token |
| 请求格式错误: … | 400 | The body is not valid JSON or lacks a required field | Check the request against the REST API |
| 记录不存在 | 404 | Not found, or outside the token's read scope | Check the ID, code and the token's read scope |
POST /facts validates each fact separately. Errors for individual facts come back in errors[{index, error}] and do not stop the others being written.
Sign-in and permissions
| Message | HTTP | Meaning | Fix |
|---|---|---|---|
| 未登录或会话已过期 | 401 | No session, or the session has expired (12 hours by default) | Sign in again |
| 需要管理员权限 | 403 | Someone other than a company admin called an admin endpoint | Ask a company admin |
| 无权执行此操作 | 403 | No edit rights on that area or group | Ask an admin with rights, or submit the link for review |
| 该登录方式需要企业版授权,请联系管理员 | 403 | A single sign-on source was used without an Enterprise licence | Activate Enterprise, or sign in with a local account, AD/LDAP or Feishu |
| 用户数已达上限(N 人),请联系管理员升级授权 | 403 | Creating an account or a first sign-in would exceed the user limit | Upgrade to Enterprise or license more users. See Editions |
Licence
| Message | HTTP | Meaning | Fix |
|---|---|---|---|
| 此版本未内置授权公钥,无法安装授权,请升级到正式发布的版本 | 503 | A development or test build | Install an official release |
| 请粘贴授权码或上传授权文件 | 400 | Nothing was submitted | Paste the licence code or choose the .lic file |
| 授权安装失败:… | 400 | The licence code or file failed verification; the reason follows the colon | Act on the reason. For example, offline licences must be uploaded as a .lic file, and a damaged file should be requested again from Reallysec |
| 无法读取本机标识:… | 503 | /etc/machine-id cannot be read inside the container | Check the file exists on the host and is mounted as in docker-compose.yml |
| 客户编号过长 | 400 | The customer number entered for the fingerprint request file is too long | Shorten it |
Upgrades
| Message | HTTP | Meaning | Fix |
|---|---|---|---|
| 在线检查更新已关闭 | 409 | The version-check URL in .env is empty | Use offline packages, or restore the check URL |
| 检查过于频繁,请稍后再试 | 429 | Manual checks are limited to one every 30 seconds | Try again shortly |
| 升级助手未安装或未运行… | 409 | The updater is not running on the host | Run sudo ./install.sh updater <installation-directory> as root |
| 未启用一键升级 | 409 | One-click upgrades are turned off in docker-compose.yml | Upgrade manually, or restore the docker-compose.yml from the package |
| 已有升级任务在进行中 | 409 | Only one upgrade can run at a time | Wait for the current upgrade to finish |
| 没有可在线升级的新版本,请先检查更新 | 409 | No new version information is available | Choose Check for updates |
| 当前版本不能直接升级到该版本 | 409 | The new version requires an intermediate version first | Upgrade to the intermediate version shown on the page first |
| 只能升级到比当前更新的版本 | 409 | The updater does not downgrade | Choose a newer version |
| 需要同时上传升级包(.tar.gz)和签名文件(.tar.gz.sig) | 400 | One of the two files is missing | Upload both together |
| 升级包签名校验失败:文件不完整、被修改,或不是官方发布的升级包 | 400 | The signature does not match | Download the package and signature file again |
| 升级包是 linux/X 的,本机是 linux/Y | 400 | Architecture mismatch | Download the package for the server's architecture |
| 上传中断或超过大小限制 | 400 | The upload did not complete | Upload again |
Feishu
| Message | HTTP | Meaning | Fix |
|---|---|---|---|
| 暂时无法连接飞书 | 502 | The server cannot reach the Feishu Open Platform, or the app credentials are invalid | Check network access to open.feishu.cn and the App Secret |
| 飞书应用未开通搜索权限(search:docs:read),请联系管理员 | 502 | The Feishu app lacks the search permission | Enable it on the Feishu Open Platform and publish a new version |
| 一次最多识别 200 个链接 | 400 | Too many Feishu links in one bulk paste | Add them in batches |
| 同步间隔只能是 30 分钟、1 小时、6 小时或 1 天 | 400 | Invalid sync interval when binding a group | Choose an interval offered on the page |
MCP
MCP uses JSON-RPC 2.0 with HTTP status 200:
| Error | Meaning |
|---|---|
-32700 parse error | The body is not valid JSON |
-32600 invalid request | Not a valid JSON-RPC request |
-32601 method not found | Unsupported method |
-32602 invalid params, unknown tool | Invalid parameters, or the tool does not exist |
When a tool fails, the result has isError: true with an explanation in content, for example when a read-only token calls a write tool (Token 缺少 enrich 权限) or an Enterprise tool is called without an Enterprise licence. A missing or invalid token returns HTTP 401.