Estimate document invalid

Moses SkodaEngineer1 min read

The API answers 422 Unprocessable Content with this problem. Its type is https://lingo.dev/docs/api/errors/estimate-document-invalid. See Errors and status codes for the shape every error shares.

Cannot estimate <documentKey>: its source does not parse in the document's format. Fix the source, or leave it out of the estimate.

Fields#

Besides the standard type, status, title and detail members, the body carries these fields. The detail text is built from them, so a client can show its own text instead.

FieldType
documentKeystring
reason"sourceUnparseable" | "previousSourceUnparseable" | "translationUnparseable" | "translationMisaligned" | "translationInvalid"
localestring

Example#

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"
}

Returned by#

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