Skip to main content

hooks.server

Documentation / hooks.server

allowCORSAccessAPI​

const allowCORSAccessAPI: Handle;

Defined in: web-app/src/hooks.server.ts:24

Enable API access for users with valid API keys and allow CORS.

Param​

RequestEvent, resolve: Function

Returns​

  • The resolved response

handle​

const handle: Handle;

Defined in: web-app/src/hooks.server.ts:96


handleError()​

function handleError(param0: object): object;

Defined in: web-app/src/hooks.server.ts:83

Handles any errors that occur during the execution of the hooks

Parameters​

ParameterTypeDescription

param0

{ error: any; message: any; status: any; }

The parameters object

param0.error

any

The error object

param0.message

any

The error message

param0.status

any

The HTTP status code

Returns​

object

The resolved event

NameTypeDefined in

message

any

web-app/src/hooks.server.ts:93