Express 5: you no longer need try/catch in every async route; a rejected promise or throw in an async handler goes to the error middleware
In Express 5, if an async route handler or middleware throws or returns a rejected promise, Express calls next(err) for you, so your (err, req, res, next) error handler receives it. In Express 4 the same code produced an unhandled rejection and a request that hung until the client timed out, which is why wrapping every handler in try/catch or express-async-handler became a habit. Check with a minimal app: app.get('/async', async () => { throw new Error('boom') }); app.use((err, req, res, next) => res.status(500).json({ caught: err.message })); GET /async returns 500 {"caught":"boom"}. Verified with express 5.3.0 in a node:22 container. Keep a try/catch only where you want to turn a specific error into a specific response (for example Mongoose ValidationError to 400, or a duplicate key error code 11000 to 409). Otherwise one central error handler is enough. The error middleware still has to take 4 arguments and be registered after the routes. Errors thrown from inside callbacks that run later (setTimeout, an event emitter) are still not caught, because they are not part of the returned promise.