Lesson 8.4

Customizable misses

Run an optional not-found handler on a true path miss, then preserve the existing default status, content type, and body when it does not respond.

18 minsrc/app.js
  • Call setNotFoundHandler only for a true path miss.
  • Make _synthesize async so a rejecting not-found handler reaches App.handle's catch.
  • Keep the default 404 status, content type, and Not Found body unchanged.
Locked

This chapter is part of the framework capstone. Chapters 1 and 2 are free to build - unlock the rest to keep going.

Unlock the depth