Bird
0
0

Which NestJS interface must a Logging Interceptor implement to work correctly?

easy📝 Conceptual Q2 of 15
NestJS - Interceptors
Which NestJS interface must a Logging Interceptor implement to work correctly?
ACanActivate
BPipeTransform
CNestInterceptor
DExceptionFilter
Step-by-Step Solution
Solution:
  1. Step 1: Recall NestJS interceptor interfaces

    Interceptors implement the NestInterceptor interface.
  2. Step 2: Match Logging Interceptor to correct interface

    Logging Interceptor must implement NestInterceptor to intercept requests.
  3. Final Answer:

    NestInterceptor -> Option C
  4. Quick Check:

    Logging Interceptor interface = NestInterceptor [OK]
Quick Trick: Logging interceptors implement NestInterceptor interface [OK]
Common Mistakes:
  • Choosing CanActivate which is for guards
  • Confusing with ExceptionFilter for error handling
  • Selecting PipeTransform which is for data transformation

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More NestJS Quizzes