The Silent Crash
When the orders database fails, the request hangs without reaching Express error handling.
The bug report
You get the whole project — a React front end, an Express API, and Mongoose models — opened in a browser editor. Reproduce the symptom by reading the code, change what’s wrong, and run the hidden tests to prove it.
What the fix must prove
- returns orders when the database succeeds
- forwards database errors to Express error middleware
- does not send a success response after a database failure