模型链不完整

Moses Skoda工程师预计阅读 1 分钟

API 返回此错误时,状态码为 422 Unprocessable Content。其 type 为 https://lingo.dev/docs/api/errors/model-chain-incomplete。所有错误的通用结构请参阅错误和状态码。

无法重新排序 <sourceLocale>→<targetLocale> 链。请求必须列出该链中的全部模型配置,每个配置只能出现一次,且不得包含链外的配置。请先读取该链,再将其中的 ID 发回。

字段#

除标准成员 type、status、title 和 detail 外,响应体还包含以下字段。detail 文本根据这些字段生成,因此客户端也可以显示自定义文本。

字段类型
sourceLocalestring
targetLocalestring

示例#

json
{
  "detail": "Cannot reorder the <sourceLocale>→<targetLocale> chain. The request must list every model config in that chain exactly once, and nothing outside it. Read the chain first and send back the ids it holds.",
  "sourceLocale": "<sourceLocale>",
  "targetLocale": "<targetLocale>",
  "type": "https://lingo.dev/docs/api/errors/model-chain-incomplete",
  "status": 422,
  "title": "Model chain incomplete"
}

返回此错误的端点#

  • PUT /v2/engines/{engineId}/model-configs/order