# 错误索引

Canonical URL: https://developers.iagenify.com/zh/sdk/meta/errors/
Language: zh

每个软件包和平台都可以用代码来回答, 并按其内容分组。 他们都以IaGenifyError的身份和代码到达。

Status: one shape · grouped by subject · codes are stable

```javascript
import { IaGenifyError, NotEnoughCredits, Unauthorized } from "iagenify";

try {
  await api.models.turn({ model, messages });
} catch (err) {
  if (err instanceof NotEnoughCredits) { /* 402, never retried */ }
  else if (err instanceof IaGenifyError) console.error(err.status, err.code, err.message);
}
```

匹配 `code`,从不在信息上:代码是合同,信息是为个人写的,翻译、缩短和改进。

## 额度 {#credits}

| 代码 | 状态 | 含义 |
| --- | --- | --- |
| not_enough_credits | 402 | 余额不会覆盖它, 扔成 `NotEnoughCredits`永不再审 |
| insufficient_credits | 402 | 同样的,对于云端附加购买。信息中列出价格和余额。 |

## 创建和运行代理 {#agent}

| 代码 | 状态 | 含义 |
| --- | --- | --- |
| machine_required | 400 | 没有机器,或者不是电脑, 电话或者云的工作空间。 |
| files_required | 400 | 手机或云工作空间没有六个文件操作。 信件名称为缺失的内容 。 |
| model_required | 400 | 没有模式,也没有会话从中取一个。 |
| invalid_mode | 400 | 四号外的一个模式 |
| unknown_tool | 400 | 引擎不知道一个工具名 。 |
| invalid_context | 400 | `contextTokens` 低于10 000,或不完全。 |
| invalid_shell | 400 | 空空空贝壳 `run` 函数。 |
| invalid_custom_tool | 400 | 无说明,无 `run`,保留的名称,或坏类别。 |
| invalid_media | 400 | 媒体的关键不是四个人中的一个。 |
| invalid_agent | 400 | 代理名不在图书馆里 |
| invalid_session_id | 400 | 不是会话标识符 。 |
| workspace_not_allowed | 400 | 软件包自有文件夹以外的工作空间 。 |
| inputs_required | 400 | `run()` 既无信息,又无投入, |
| context_too_large | 400 | 谈话不合适,在借记之前拒绝 |

## 届会和检查站 {#sessions}

| 代码 | 状态 | 含义 |
| --- | --- | --- |
| session_required | 400 | 呼呼需求 `memory: true`. |
| agent_running | 409 | 它在回答问题。 `stop()` 头一个。 |
| checkpoints_disabled | 400 | `checkpoints: false`. |
| invalid_checkpoint | 400 | 并不是全部的数 至少1。 |
| checkpoint_not_found | 404 | 没有此信件。 信件列出了可用的内容 。 |
| checkpoint_compacted | 404 | 这条信息被总结了一下 |

## 模型转 {#turns}

| 代码 | 状态 | 含义 |
| --- | --- | --- |
| turn_failed | 502 | 提供商拒绝了转弯, 其信息被传送, 编辑 。 |
| turn_incomplete | 502 | 河水无果而终。 |
| stream_failed | 502 | 河水破了 重新查过一次 |

## 本地和账户上的本地文件 {#files}

| 代码 | 状态 | 含义 |
| --- | --- | --- |
| local_files_require_node | 400 | 运行环境没有文件系统。 |
| storage_not_on_this_machine | 409 | 那个储藏室属于另一台电脑 |
| invalid_path | 400 | 绝对,在工作空间之外,或者根 |
| path_not_found | 404 | 什么都没有 |
| path_exists | 409 | 目的地被带走了 |
| not_a_file · not_a_folder | 400 | 路径是另一种类型。 |
| missing_content · invalid_content | 400 | 无法写入的字型 。 |
| file_not_found · file_missing_on_disk | 404 | 账户中没有此文件, 记录中也没有字节 。 |

## 储存储存 {#storages}

| 代码 | 状态 | 含义 |
| --- | --- | --- |
| storage_not_found | 404 | 此账户上没有此存储 。 |
| storage_not_local | 400 | 非计算机:使用 `run()`. |
| storage_is_phone | 400 | 手机浏览器里有它的文件 |
| storage_is_local | 400 | 计算机在账户上没有字节。 |
| invalid_service | 400 | 不无 `nosql`, `sql` 或 `object`. |
| cloud_storage_limit | 403 | 使用该计划的计算服务。 |
| quota_exceeded | 403 | 写作会通过上限。 |
| query_timeout | 408 | 发言时间过长。 |
| invalid_key · object_not_found | 400 = 404 | 无法使用的钥匙,或者它什么都没有。 |
| embedding_unavailable | 503 | 语义搜索拒绝 而不是回答一个后退。 |

## 云云加 {#cloud}

| 代码 | 状态 | 含义 |
| --- | --- | --- |
| invalid_addon | 400 | 不无 `database` 或 `object`. |
| invalid_gb | 400 | 并非全部数字至少为1, 或超过100GB限制。 |

## 搜索、获取、转换 {#web}

| 代码 | 状态 | 含义 |
| --- | --- | --- |
| query_required · url_required | 400 | 缺少一个所需的字段 。 |
| url_refusee · invalid_url | 400 | 警卫拒绝或无法使用地址。 |
| fetch_failed | 502 | 无法打开页面。 信用被回馈 。 |
| unsupported_conversion | 400 | 配对不在矩阵中,信息中列出可能的目标。 |
| missing_formats · missing_source | 400 | 没有格式, 也没有源代码 。 |
| conversion_failed | 502 | 转换器拒绝了字节。 信用额被回拨 。 |

## MCP {#mcp}

| 代码 | 状态 | 含义 |
| --- | --- | --- |
| url_not_https · url_blocked | 400 | 或一个不公开的地址。 |
| mcp_token_malformed | 400 | 象征性含有一个空间 。 |
| mcp_token_required · mcp_unauthorized | 401 | 需要或拒绝一个标志。 |
| mcp_redirect | 502 | 改变方向,从不被跟踪 |
| mcp_protocol_unsupported | 502 | 没有共同的修订。 |
| mcp_unreachable · mcp_timeout | 502 □ 504 | 无法及时答复。 |
| mcp_error · mcp_http_error · mcp_bad_response | 502 | 协议错误, a HTTP 或无法读取的答复。 |

## 工作流 {#workflows}

| 代码 | 状态 | 含义 |
| --- | --- | --- |
| invalid_workflow | 400 | 拒绝定义。 信件中指定了步骤和问题 。 |
| run_not_waiting | 400 | 跑步不是在人类的一步上停止的 |
| run_not_retryable | 400 | 这项工作仍在进行,或者在所选择的人没有成功之前迈出了一步。 |
| step_not_found · step_not_executable | 400 | 任何这样的步骤,或人类的一步 没有任何执行。 |
| 超时超时 | 408 | `wait()` 放弃。 **跑步继续** |

## 域和邮件 {#domains}

| 代码 | 状态 | 含义 |
| --- | --- | --- |
| domain_taken | 409 | 已经被附在了某个地方 |
| domain_not_attached | 409 | 我们只写在我们所持有的区。 |
| mail_would_replace_mx | 409 | 邮件现场直播在这里 `details.current` 说到哪里去 |
| mail_not_enabled | 403 | 主机还没有邮件记录 。 |
| mail_not_in_plan | 403 | 该计划没有邮件服务。 |
| address_taken · address_reserved | 409 □ 400 | 被作为邮箱或别名,或保留的名称。 |
| dmarc_step_too_big | 400 | 直接跳到最严格的政策 |
| dmarc_not_enforced · public_url_missing | 400 | 这两扇门的标志必须经过。 |

## 托管 {#hosting}

| 代码 | 状态 | 含义 |
| --- | --- | --- |
| invalid_kind · invalid_slug | 400 | 没有任何同类,或一种不能使用或预留的子弹。 |
| slug_taken | 409 | 有人有那个地址 |
| hosting_limit · hosting_not_in_plan | 403 | 计划计算是用过的,或者它没有主机 |
| hosting_kind_unavailable | 501 | 那种东西是不能用的 |
| nothing_to_deploy | 400 | 没有文件,没有代码,或者没有路径的文件 。 |
| deploy_too_large | 413 | 过一个约束。信息中指定文件名。 |

## 技能与子智能体 {#library}

| 代码 | 状态 | 含义 |
| --- | --- | --- |
| invalid_name | 400 | 不是小写字母、数字和破折号。 |
| not_found | 404 | 都从不从源头 |
| item_on_computer | 409 | 它只存在于此计算机上。 信息名称文件夹 。 |
| not_a_skill | 400 | 只有技能才有文件 |

- [错误](/zh/sdk/concepts/errors): 上课, 和什么接球。
- [重试](/zh/sdk/concepts/retries): 是什么又被试了一次。
- [额度](/zh/sdk/concepts/credits): 402个家庭

```python
from iagenify import IaGenifyError, NotEnoughCredits, Unauthorized

try:
    api.models.turn(model=model, messages=messages)
except NotEnoughCredits:
    pass  # 402, never retried
except IaGenifyError as error:
    print(error.status, error.code, error)
```
