用户非组织成员

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

发生此问题时,API 返回 404 Not Found。其 type 为 https://lingo.dev/docs/api/errors/user-not-member。所有错误的通用结构,请参阅错误和状态码。

用户 <userId> 不是此组织的成员。请先邀请该用户,再设置其角色。

字段#

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

字段类型
organizationIdstring
userIdstring

示例#

json
{
  "detail": "User <userId> is not a member of this organization. Invite them first, then set their role.",
  "organizationId": "<organizationId>",
  "userId": "<userId>",
  "type": "https://lingo.dev/docs/api/errors/user-not-member",
  "status": 404,
  "title": "User not a member"
}

返回此错误的端点#

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