Put in order · NestJS course · Module 6: Error Handling and Monitoring
throw new HttpException Syntax
Arrange the syntax for throwing an HttpException with a response object and status code
Items to put in order
- HttpStatus.NOT_FOUND);
- throw new HttpException(
- { message: 'Legion not found', error: 'Not Found' },
You can check the correct answer by solving this task in the CodeWorlds game.