语言区域对无匹配模型

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

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

没有与 <sourceLocale> → <targetLocale> 匹配的模型配置。请为此语言区域对添加模型配置,或添加通配符回退配置。

字段#

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

字段类型
engineIdstring
sourceLocalestring
targetLocalestring

示例#

json
{
  "detail": "No model configuration matches <sourceLocale> → <targetLocale>. Add a model configuration for this locale pair or a wildcard fallback.",
  "engineId": "<engineId>",
  "sourceLocale": "<sourceLocale>",
  "targetLocale": "<targetLocale>",
  "type": "https://lingo.dev/docs/api/errors/model-chain-missing",
  "status": 422,
  "title": "No model for the locale pair"
}

返回此错误的端点#

  • POST /v2/localization/jobs/{id}/start
  • POST /v2/organizations/{orgId}/localization/estimates