Question · NestJS course · Module 2: Routing and Request Lifecycle
Interceptor - Dual Nature
What distinguishes Interceptors from other elements of the NestJS pipeline?
Answer options
- They execute only once, before the handler
- They execute twice - before and after the Route Handler
- They execute only in case of an error
- They do not have access to the execution context
Show the answer
Correct answer:
- They execute twice - before and after the Route Handler