连接使用中

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

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

连接 <id> 正被 <label> (2) 使用,无法断开连接。请先将它们移至其他连接。

字段#

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

字段类型
idstring
usagesobject[]
usages[].labelstring
usages[].countinteger
usages[].disconnect"blocks" | "removed"

示例#

json
{
  "detail": "Connection <id> cannot be disconnected while it is in use by <label> (2). Move them to another connection first.",
  "id": "<id>",
  "usages": [
    {
      "label": "<label>",
      "count": 2,
      "disconnect": "blocks"
    }
  ],
  "type": "https://lingo.dev/docs/api/errors/connection-in-use",
  "status": 409,
  "title": "Connection in use"
}