Question · NestJS course · Module 2: Routing and Request Lifecycle
Pipe Rejects Data - Scenario
An interceptor logs the time in tap() after the response, and a pipe throws BadRequestException. What still runs?
Answer options
- The handler and the time log from tap()
- Only the exception filter - the handler never runs and tap() gets no response
- The time log from tap() and the exception filter
- Nothing - the client gets no response at all
Show the answer
Correct answer:
- Only the exception filter - the handler never runs and tap() gets no response