内联源内容过大

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

API 返回 422 Unprocessable Content 时,会附带此错误信息。其 type 为 https://lingo.dev/docs/api/errors/inline-source-too-large。所有错误的通用结构,请参阅错误和状态码。

"<documentKey>" 的内联源内容序列化后大小为 2 字节,超过了产物的 2 字节大小限制。请将文档拆分为多个较小的文档。

字段#

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

字段类型
documentKeystring
bytesinteger
maxBytesinteger

示例#

json
{
  "detail": "The inline source of \"<documentKey>\" is 2 bytes once serialized, over the 2-byte artifact limit. Split the document into smaller ones.",
  "documentKey": "<documentKey>",
  "bytes": 2,
  "maxBytes": 2,
  "type": "https://lingo.dev/docs/api/errors/inline-source-too-large",
  "status": 422,
  "title": "Inline source too large"
}

返回此错误的端点#

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