Lesson 8.3
headersSent decides the error action
Catch an unhandled dispatch failure in App.handle, write a generic response before emission, and destroy the affected socket after emission.
What you will build
- Explain what res.headersSent proves and why a second response is invalid.
- Make App.handle resolve after every application-level handler failure.
- Map an exposed HttpError to a generic status phrase without leaking its message or stack.