Poslední vlastník

Moses SkodaVývojář1 min čtení

API při tomto problému vrací 409 Conflict. Hodnota type je https://lingo.dev/docs/api/errors/last-owner-removal. Formát společný všem chybám najdete v části Chyby a stavové kódy.

Uživatel <userId> je posledním vlastníkem organizace <organizationId>. Organizace musí mít alespoň jednoho vlastníka. Nejprve přiřaďte roli vlastníka jinému členovi.

Pole#

Kromě standardních položek type, status, title a detail obsahuje tělo odpovědi následující pole. Z nich se sestavuje text detail, takže klient může místo něj zobrazit vlastní text.

PoleTyp
organizationIdstring
userIdstring

Příklad#

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"
}

Koncové body vracející tuto chybu#

  • DELETE /v2/members/{id}
  • PATCH /v2/organizations/{orgId}/members/{userId}