BugsRadar

Express error handler

Updated 1 October 2026 · BugsRadar team

One middleware from the bugsradar package: every unhandled error of a request is reported with the method and the path of the request, and your own error handler still answers it.

Install the package and create the client first: see Install and Create the client. The API key is secret: where it may go.

Add the error handler

After your routes:

app.js
import express from 'express';
import { expressErrorHandler } from 'bugsradar/express';
import { bugsRadar } from './bugsradar.js';

const app = express();
// ... your routes
app.use(expressErrorHandler(bugsRadar));

What it reports

It reports the error with the method and the path of the request, then passes it on with next(error), so your own error handler still answers the request. Errors with a status below 500, such as a 404 from http-errors, are passed on without a report.

Errors you catch yourself go through direct calls. What the message looks like in the chat, how repeats are counted and when errors are bundled: see What you receive.

Next: winston transport →