Set up
npm i pagerlessimport { Hono } from "hono";
import { pagerlessMiddleware } from "pagerless/hono";
const app = new Hono();
app.use(pagerlessMiddleware());What it catches
- Errors your handlers throw (it reads
c.errorafter the handler). - On Workers it starts from
c.envand sends inexecutionCtx.waitUntil. - Reports 5xx and crashes only, never 4xx, and leaves the response, logs and error exactly as they were.
Questions
Where does the key go on Workers?
npx wrangler secret put PAGERLESS_KEY. The middleware reads it from the Worker's env.