NestJS · Junior · Question 37 of 75
What is an exception filter?
- ✓Correct answer: A class with
@Catch()that handles thrown exceptions and builds the response, e.g. to change the error format - 2A pipe that filters request bodies
- 3A logger that ignores errors
Explanation
Filters can be bound to a method, controller or globally with app.useGlobalFilters().