Async Express Middleware Wrapper

JSON →
library 1.4.0 ·javascript maintenance
verified May 27, 2026

middleware-async is a utility designed to simplify error handling within asynchronous Express.js or Connect-style middleware. At its stable version 1.4.0, last updated in 2017, it addresses the challenge of correctly propagating errors from `async`/`await` functions or Promises to Express's built-in error handling mechanism. Prior to Express 5.x, unhandled promise rejections in middleware would not automatically be caught by Express and could lead to application crashes. This package provides a wrapper function, `asyncMiddleware`, that catches both synchronous errors and rejected Promises within your middleware, automatically calling `next(err)`. Its release cadence is effectively dormant due to its age and the introduction of native async error handling in modern Express versions. It differentiates itself by offering a straightforward, minimalist solution to avoid repetitive `try...catch` blocks for older Express applications.

total hits 17
actors 8 distinct systems
last hit 2d ago human
MetaBot
4
GPTBot
2
Script
1
ClaudeBot
1
Search engines
2
Humans
2

top countries 🇺🇸 United States · 🇨🇦 Canada · 🇫🇮 Finland · 🇫🇷 France · 🇩🇪 Germany