Integrations · JavaScript framework

Pagerless for Astro

One middleware export, or the integration in `astro.config`. Errors from pages, endpoints and later middleware are reported and re-thrown.

Set up

npm i pagerless
src/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.

Updated .

Free for you and one backup · 3 apps · no card

Sleep through the small stuff.

Run one command in your repo. Pagerless shows every change before it makes it.

npx pagerless connect