待估算文档无效

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

出现此问题时,API 会返回 422 Unprocessable Content。其 type 为 https://lingo.dev/docs/api/errors/estimate-document-invalid。所有错误的通用结构,请参阅错误和状态码。

无法估算 <documentKey>:其源内容无法按该文档的格式解析。请修正源内容,或将该文档排除在估算之外。

字段#

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

字段类型
documentKeystring
reason"sourceUnparseable" | "previousSourceUnparseable" | "translationUnparseable" | "translationMisaligned" | "translationInvalid"
localestring

示例#

json
{
  "detail": "Cannot estimate <documentKey>: its source does not parse in the document's format. Fix the source, or leave it out of the estimate.",
  "documentKey": "<documentKey>",
  "reason": "sourceUnparseable",
  "locale": "pt-BR",
  "type": "https://lingo.dev/docs/api/errors/estimate-document-invalid",
  "status": 422,
  "title": "Estimate document invalid"
}

返回此错误的端点#

  • POST /v2/organizations/{orgId}/localization/estimates