Details provided an onError
hook.
cause: unknown
The cause of the error. This is typically an Error
instance, but can be
any value.
optional
requestEvent: RequestEvent<Env>
The request event which was being processed when the error occurred.
If the error occurs outside of handling a request, this will be
undefined
.
optional
respondable: boolean
If the error occurred before a response was returned to the client, this
will be true
. This indicates that the error hook can return a response
which will be sent to the client instead of the default response.