Skip to content

basalt / permissions/src / ResourceNotFoundError

Class: ResourceNotFoundError ​

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

A meta.can resource requirement's loader found nothing (returned null or undefined). The default answer is a 404: there is nothing to authorize against. Set notFound: 'deny' (on the requirement, or resourceNotFound on the plugin) to answer 403 instead, so a caller cannot tell a missing resource from one they may not touch.

Extends ​

Constructors ​

Constructor ​

> new ResourceNotFoundError(): ResourceNotFoundError

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

Returns ​

ResourceNotFoundError

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: 404 = 404

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

Released under the MIT License.