How do you handle errors in async/await? What happens on an unhandled rejection?
You wrap awaited calls in try/catch, or attach .catch to the returned promise. In Express, an error thrown inside an async handler is not caught by the framework unless you forward it to next(), so most teams use a wrapper or express-async-errors. An unhandled rejection terminates the process by default in modern Node, which is intentional — the process is in an unknown state and should be restarted.