最後のオーナー

Moses Skodaエンジニア読了目安 1分

APIは、このエラーを返す際に409 Conflictで応答します。typeはhttps://lingo.dev/docs/api/errors/last-owner-removalです。すべてのエラーに共通する形式については、エラーとステータスコードを参照してください。

ユーザー<userId>は、組織<organizationId>に残る最後のオーナーです。組織には少なくとも一人のオーナーが必要です。先に別のメンバーにオーナーのロールを付与してください。

フィールド#

レスポンス本文には、標準のtype、status、title、detailの各メンバーに加えて、以下のフィールドが含まれます。detailのテキストはこれらのフィールドをもとに生成されるため、クライアント側で独自のテキストに置き換えて表示できます。

フィールド型
organizationIdstring
userIdstring

例#

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}