角色使用中

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

API 返回此错误以响应 409 Conflict。其 type 为 https://lingo.dev/docs/api/errors/role-in-use。所有错误的通用结构请参阅错误和状态码。

角色 <id> 仍被两个服务 API 密钥使用,无法删除。请先为这两个密钥分配其他角色,或撤销这两个密钥。

字段#

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

字段类型
idstring
apiKeysnumber | "Infinity" | "-Infinity" | "NaN"

示例#

json
{
  "detail": "Role <id> is still assigned to 2 service API keys and cannot be deleted. Give those keys a different role or revoke them first.",
  "id": "<id>",
  "apiKeys": 2,
  "type": "https://lingo.dev/docs/api/errors/role-in-use",
  "status": 409,
  "title": "Role in use"
}

返回此错误的端点#

  • DELETE /v2/roles/{id}