Skip to content

basalt / teams/src / UnknownTeamRoleError

Class: UnknownTeamRoleError ​

Defined in: teams/src/teams.ts:62

A role requirement (e.g. meta.teamRole) names a role that is neither ranked (roleRank) nor listed in grantableRoles — almost always a typo ('Admin', 'adimn') or an empty value. A server misconfiguration, so it fails closed with a 500 instead of ranking the unknown role 0 and admitting every member.

Extends ​

Constructors ​

Constructor ​

> new UnknownTeamRoleError(role): UnknownTeamRoleError

Defined in: teams/src/teams.ts:64

Parameters ​

role ​

unknown

Returns ​

UnknownTeamRoleError

Overrides ​

BasaltError.constructor

Properties ​

code ​

> readonly code: string

Defined in: core/src/errors.ts:25

Inherited from ​

BasaltError.code


details? ​

> readonly optional details?: Record<string, unknown>

Defined in: core/src/errors.ts:28

Structured payload passed to the constructor, exactly as given (never sanitised here).

Inherited from ​

BasaltError.details


status ​

> readonly status: 500 = 500

Defined in: teams/src/teams.ts:63

Released under the MIT License.