IAccessControlErrorOptions
Defined in: src/core/AccessControlError.ts:6
Options for constructing an AccessControlError. Extends the standard
ErrorOptions (so a cause can be attached) with optional structured
context for programmatic handling.
Extends
Section titled “Extends”ErrorOptions
Properties
Section titled “Properties”
optionalcode?:string
Defined in: src/core/AccessControlError.ts:12
Stable, machine-readable code for programmatic handling. Branch on this
instead of parsing message (messages are redacted by default and may
change wording). See ErrorCode.
optionalrole?:string|string[]
Defined in: src/core/AccessControlError.ts:14
The role(s) this error relates to, if any.
resource?
Section titled “resource?”
optionalresource?:string
Defined in: src/core/AccessControlError.ts:16
The resource this error relates to, if any.
action?
Section titled “action?”
optionalaction?:string
Defined in: src/core/AccessControlError.ts:18
The action this error relates to, if any.
asyncRequired?
Section titled “asyncRequired?”
optionalasyncRequired?:boolean
Defined in: src/core/AccessControlError.ts:24
Set when the fault is “this check needs the async path” — i.e. an applicable
rule/gate carries a custom/async { fn } condition. The engine uses it to
defer such checks to grantedAsync/checkAsync.
cause?
Section titled “cause?”
optionalcause?:unknown
Defined in: site/node_modules/typescript/lib/lib.es2022.error.d.ts:20
Inherited from
Section titled “Inherited from”ErrorOptions.cause