Exercise 1: The Catch-All Route Registered Too Early — Possible Solution ==================================================================== WHAT WOULD HAPPEN ------------------------------ Express matches routes in the order they were registered and stops at the first match. app.get("*", ...) matches every path with no exception, including /api/items. If it were registered before app.use("/api/items", itemsRouter), a request for /api/items would never reach itemsRouter at all - the catch-all would match first, call res.sendFile() with index.html, and the request would be considered fully handled right there. The actual API router further down would simply never run for that request. WHY NO ERROR WOULD APPEAR ANYWHERE ------------------------------ The request itself succeeds completely from Express's own point of view - a real file (index.html) is found and sent back with a normal 200 status. There's no exception, no failed lookup, no crash. The only symptom is that the client receives raw HTML markup where it expected a JSON array, and any code trying to call response.json() on that would fail there instead - several layers away from the actual root cause, and with no message anywhere pointing back to route registration order. WHY THIS WORKS AS AN ANSWER ------------------------------ It correctly traces the exact mechanism (first-match routing, and the catch-all's own unrestricted pattern) rather than describing the bug vaguely, and it explains specifically why this fails silently - a successful response with the wrong content, not an error - rather than assuming any misconfiguration produces a visible failure.