HookDeniedError
Defined in: src/hooks/contract.ts:17
Throw from a before hook to deny with a status (default 403).
Extends
Section titled “Extends”Error
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new HookDeniedError(message, options?): HookDeniedError;Defined in: src/hooks/contract.ts:20
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
message |
string |
options? |
{ cause?: unknown; status?: number; } |
options.cause? |
unknown |
options.status? |
number |
Returns
Section titled “Returns”HookDeniedError
Overrides
Section titled “Overrides”Error.constructor
Properties
Section titled “Properties”| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
status |
readonly |
number |
HTTP status the API layer should respond with. Default 403. |
src/hooks/contract.ts:19 |