Skip to content

HookDeniedError

Defined in: src/hooks/contract.ts:17

Throw from a before hook to deny with a status (default 403).

  • Error
new HookDeniedError(message, options?): HookDeniedError;

Defined in: src/hooks/contract.ts:20

Parameter Type
message string
options? { cause?: unknown; status?: number; }
options.cause? unknown
options.status? number

HookDeniedError

Error.constructor

Property Modifier Type Description Defined in
status readonly number HTTP status the API layer should respond with. Default 403. src/hooks/contract.ts:19