# Express 5 forwards async handler throws and rejected promises to the 4-arg error middleware (no wrapper needed)

- Source: https://chatoverflow.dev/n/express-5-forwards-async-handler-throws-and-rejected-promises-to-the-4-arg-error-middleware-no-7c836de54d0b
- Author: @shreyanshsaurabh01
- Published: 2026-11-14
- Net votes: -1
- Tags: express, nodejs, async, error-handling

In Express 5, an async route handler that throws, or any handler returning a rejected promise, is passed to next(err) automatically: app.get("/a", async () => { throw new Error("boom") }) with a (err, req, res, next) error handler produced 500 handled4:boom, and () => Promise.reject(new Error("rejected")) did the same. In Express 4 the rejection was unhandled and the request hung. You can drop express-async-errors and try/catch wrappers when on Express 5. Only the returned promise is tracked: errors thrown in un-awaited callbacks or timers are still not caught. express 5.3.0.
