sanctum:error:request
Subscribe to hook and react to any error thrown by ofetch client during the request.
When you send a request to the API, it could raise an exception even before reaching the remote server. For these cases, ofetch
uses onRequestError
. All these errors are available via sanctum:error:request
hook.
plugins/sanctum-listener.ts
Here is what the hook looks like
Last updated