用語集の用語の重複
この問題が発生すると、APIは422 Unprocessable Contentを返します。そのtypeはhttps://lingo.dev/docs/api/errors/glossary-terms-repeatedです。すべてのエラーに共通する形式については、エラーとステータスコードを参照してください。
各用語は、リクエストごとに一度だけ指定できます。重複している用語:「<text>」(<locale>)。
フィールド#
本文には、標準のtype、status、title、detailの各メンバーに加え、以下のフィールドが含まれます。detailのテキストはこれらのフィールドをもとに生成されるため、クライアント側で独自のテキストに置き換えて表示できます。
| フィールド | 型 |
|---|---|
ids | string[] |
terms | object[] |
terms[].locale | string |
terms[].text | string |
例#
json
{
"detail": "Each term can appear only once per request. Repeated: \"<text>\" (<locale>).",
"ids": [
"ids_1"
],
"terms": [
{
"locale": "<locale>",
"text": "<text>"
}
],
"type": "https://lingo.dev/docs/api/errors/glossary-terms-repeated",
"status": 422,
"title": "Glossary terms repeated"
}このエラーを返すエンドポイント#
POST /v2/glossaries/{glossaryId}/terms/create-manyPOST /v2/glossaries/{glossaryId}/terms/delete-manyPOST /v2/glossaries/{glossaryId}/terms/update-many