Set up
npm i pagerlesssrc/hooks.server.ts and src/hooks.client.ts
export { handleError } from "pagerless/sveltekit";Already have a handleError? Wrap it: export const handleError = handleErrorWithPagerless(myHandler). In the browser, also start the client with init from pagerless/browser.
What it catches
- Errors in load functions, actions, endpoints and rendering.
- Skips 404s and expected errors.
- Reports 5xx and crashes only, never 4xx, and leaves the response, logs and error exactly as they were.
Questions
Will a 404 page alert me?
No. Not-found and expected errors are skipped.