# Pagerless for Hono

> One middleware right after new Hono(), on every runtime Hono runs on.

URL: https://pagerless.dev/integrations/hono
Updated: 2026-10-22

## Set up

```bash
npm i pagerless
```

```ts
import { 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.error` after the handler).
- On Workers it starts from `c.env` and sends in `executionCtx.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.
