最后一位所有者
发生此错误时,API 返回 409 Conflict。其 type 为 https://lingo.dev/docs/api/errors/last-owner-removal。所有错误的通用结构,请参阅错误和状态码。
用户 <userId> 是组织 <organizationId> 的最后一位所有者。组织必须保留至少一位所有者。请先为另一位成员分配所有者角色。
字段#
除标准的 type、status、title 和 detail 成员外,响应体还包含以下字段。detail 文本根据这些字段生成,因此客户端也可以显示自定义文本。
| 字段 | 类型 |
|---|---|
organizationId | string |
userId | string |
示例#
json
{
"detail": "User <userId> is the last owner of organization <organizationId>. An organization must keep at least one owner. Give the owner role to another member first.",
"organizationId": "<organizationId>",
"userId": "<userId>",
"type": "https://lingo.dev/docs/api/errors/last-owner-removal",
"status": 409,
"title": "Last owner"
}返回此错误的端点#
DELETE /v2/members/{id}PATCH /v2/organizations/{orgId}/members/{userId}