エンジンの提案が無効

Moses Skodaエンジニア読了目安 1分

APIは、この問題を422 Unprocessable Contentで返します。typeはhttps://lingo.dev/docs/api/errors/engine-suggestion-invalidです。すべてのエラーに共通する構造については、エラーとステータスコードを参照してください。

このエンジンの提案は、ルールのテキストが空のため適用できません。この提案を却下してください。

フィールド#

本文には、標準のメンバーであるtype、status、title、detailに加え、次のフィールドが含まれます。detailのテキストはこれらのフィールドをもとに生成されるため、クライアント側で独自のテキストに置き換えて表示できます。

フィールド型
idstring
reason"ruleTextEmpty" | "changeUnreadable" | GlossaryTermTextEmpty | GlossaryTermLocaleNotCovered | GlossaryTermTargetAmbiguous | GlossaryTermWildcardTranslated

例#

json
{
  "detail": "Cannot apply this engine suggestion. Its rule text is empty. Dismiss it.",
  "id": "<id>",
  "reason": "ruleTextEmpty",
  "type": "https://lingo.dev/docs/api/errors/engine-suggestion-invalid",
  "status": 422,
  "title": "Engine suggestion invalid"
}

このエラーを返すエンドポイント#

  • POST /v2/engine-suggestions/{id}/apply