# Pagerless for Express

> One error handler after your routes. Routes are grouped by Express's own pattern, so /orders/:id is one route, not thousands.

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

## Set up

```bash
npm i pagerless
```

```js
import { pagerlessErrorHandler } from "pagerless/express";

// after your routes, before your own error handler
app.use(pagerlessErrorHandler());
```

It passes every error on with `next(err)`, so your own handler still runs.

## What it catches

- 5xx and unknown errors from your routes.
- Reports 5xx and crashes only, never 4xx, and leaves the response, logs and error exactly as they were.
- On Node it also starts the SDK: uncaught errors and unhandled rejections, status and latency per route, failing outbound calls (Stripe, OpenAI, Supabase and others named), a heartbeat every 60 seconds and a deploy marker.

## Questions

### Is import "pagerless/auto" still enough?

It still reports crashes, 5xx counts and failing calls. The error handler adds the errors Express catches itself, with their stack.
