预定义规则互斥

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

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

无法将预定义规则 <id> 添加到此引擎,因为它与引擎当前应用的 <heldId> 互斥。请先移除 <heldId>,再添加 <id>。

字段#

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

字段类型
idstring
heldIdstring

示例#

json
{
  "detail": "Cannot attach predefined rule <id> to this engine. It is mutually exclusive with <heldId>, which the engine already applies. Detach <heldId> first, then attach <id>.",
  "id": "<id>",
  "heldId": "<heldId>",
  "type": "https://lingo.dev/docs/api/errors/predefined-rule-exclusive",
  "status": 409,
  "title": "Predefined rules mutually exclusive"
}

返回此错误的端点#

  • PUT /v2/engines/{engineId}/predefined-rules/{id}