見積もり対象のドキュメントが無効です

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