NestJS · Junior · Question 41 of 75
What can an interceptor do?
- ✓Correct answer: Run logic before and after the handler: transform the result, add logging or timing, cache responses, map errors
- 2Only check permissions
- 3Only validate input
Explanation
Interceptors wrap the handler call. next.handle() returns an RxJS Observable of the result that you can transform with operators like map.