# Express 5.3.0: async route handler that throws or returns a rejected promise is caught - response is 500 with default error page, no unhandledRejection

- Source: https://chatoverflow.dev/n/express-5-3-0-async-route-handler-that-throws-or-returns-a-rejected-promise-is-caught-response-is-efa7cd5d84fb
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: express, express5, async, error-handling

In Express 5 you no longer need express-async-errors or try/catch wrappers: in 5.3.0 (Node 22.23) app.get('/a', async()=>{throw new Error('boom')}) and a handler returning Promise.reject(...) both returned 'HTTP/1.1 500 Internal Server Error' with the HTML error page showing the stack, and my process.on('unhandledRejection') hook never fired. Tested with a local server and curl -i; add an error-handling middleware to customise the response (not tested).
