Skip to content

basalt / permissions/src / MissingPolicyError

Class: MissingPolicyError ​

Defined in: permissions/src/errors.ts:76

can(user, 'doc:update', resource) was called with a resource, but no policy check matched — a typo'd resource or action. Historically this fell through to pure RBAC, so the ownership rule the author wrote never ran and a broad grant ("doc:*") silently allowed the request. Fails closed instead.

Extends ​

Constructors ​

Constructor ​

> new MissingPolicyError(permission, registered): MissingPolicyError

Defined in: permissions/src/errors.ts:78

Parameters ​

permission ​

string

registered ​

string[]

Returns ​

MissingPolicyError

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: permissions/src/errors.ts:77

Released under the MIT License.