术语表中已存在该术语

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

发生此错误时,API 会返回 409 Conflict。其 type 为 https://lingo.dev/docs/api/errors/glossary-terms-taken。所有错误的通用结构请参阅错误和状态码。

无法保存“<texts>”。此术语表中已有文本和语言区域均相同的术语。请编辑现有术语,或修改文本。

字段#

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

字段类型
textsstring[]

示例#

json
{
  "detail": "Cannot save \"<texts>\". This glossary already holds a term with that text and locale. Edit that term instead, or change the text.",
  "texts": [
    "<texts>"
  ],
  "type": "https://lingo.dev/docs/api/errors/glossary-terms-taken",
  "status": 409,
  "title": "Glossary terms taken"
}

返回此错误的端点#

  • PATCH /v2/glossaries/{glossaryId}/terms/{id}
  • POST /v2/glossaries/{glossaryId}/terms
  • POST /v2/glossaries/{glossaryId}/terms/create-many