Put in order · NestJS course · Module 2: Routing and Request Lifecycle

Throwing a NotFoundException

Arrange the elements of throwing a 404 exception in NestJS:

Items to put in order

  • ('Tribute not found!')
  • NotFoundException
  • throw new
Show the answer

Correct order:

  1. throw new
  2. NotFoundException
  3. ('Tribute not found!')