Put in order · NestJS course · Module 2: Routing and Request Lifecycle
Interceptor Execution Phases
Order the execution phases of an interceptor in NestJS:
Items to put in order
- Logic before passing the request (before)
- Executing the route handler (next.handle())
- Calling the intercept() method
- Response processing (after)
Show the answer
Correct order:
- Calling the intercept() method
- Logic before passing the request (before)
- Executing the route handler (next.handle())
- Response processing (after)