Set up
npm i pagerlesssrc/middleware.ts
export { onRequest } from "pagerless/astro";or astro.config.mjs
import pagerless from "pagerless/astro";
export default defineConfig({ integrations: [pagerless()] });What it catches
- Errors from pages, endpoints and middleware that runs after it.
- Reports 5xx and crashes only, never 4xx, and leaves the response, logs and error exactly as they were.
Questions
Middleware or integration?
Either. The integration adds the same middleware first in the chain for you.