Concept Flow - Synchronous error handling
Request received
Route handler starts
Code runs synchronously
Error occurs?
No→Send response
Yes
Throw error
Express catches error
Error-handling middleware runs
Send error response
This flow shows how Express handles errors thrown synchronously inside route handlers by passing them to error middleware.