basalt / permissions/src / ScopeRequiredError
Class: ScopeRequiredError
Defined in: permissions/src/errors.ts:118
A grant write (assignRole, grantToUser, grantTemporarily, delegate…) was made with no explicit scope, in a multi-tenant app, while no tenant is in the context. Defaulting to the global scope there would turn a tenant administration call — say, on a request whose tenant failed to resolve — into a platform-wide grant, so the write fails closed. Pass the scope explicitly (a tenant id, or GLOBAL_SCOPE when a global grant is really meant), run it inside the tenant's context, or build the Gate with allowGlobalWrites: true.
Extends
Constructors
Constructor
> new ScopeRequiredError(operation): ScopeRequiredError
Defined in: permissions/src/errors.ts:120
Parameters
operation
string
Returns
ScopeRequiredError
Overrides
Properties
code
> readonly code: string
Defined in: core/src/errors.ts:25
Inherited from
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
status
> readonly status: 400 = 400
Defined in: permissions/src/errors.ts:119