Middy JSON Error Handler Middleware

JSON →
library 4.0.0 ·javascript
verified May 27, 2026

A middleware for the Middy.js Lambda middleware engine that converts thrown errors into structured JSON HTTP responses, compatible with http-errors. Current stable version is 4.0.0 (released 2023-07-26). Follows semantic release, with updates every few months. Key differentiators: automatic JSON serialization, support for http-errors and custom error classes, configurable property omission (stack, name, etc.), and the ability to expose internal errors via the `expose` property even for 5xx responses. Ships TypeScript types.

total hits 26
actors 9 distinct systems
last hit 1d ago Bingbot
ByteDance
5
MetaBot
4
GPTBot
2
Script
1
Amazonbot
1
ClaudeBot
1
Search engines
1
Humans
6

top countries 🇺🇸 United States · 🇸🇬 Singapore · 🇨🇦 Canada · 🇫🇮 Finland · 🇪🇸 Spain