Bird
0
0

Which NestJS feature do guards primarily interact with to control access?

easy📝 Conceptual Q2 of 15
NestJS - Guards
Which NestJS feature do guards primarily interact with to control access?
AExecutionContext
BException filters
CInterceptors
DPipes
Step-by-Step Solution
Solution:
  1. Step 1: Identify the interaction point of guards

    Guards use ExecutionContext to access request details and decide access.
  2. Step 2: Differentiate from other features

    Exception filters handle errors, interceptors modify responses, and pipes transform data, not control access.
  3. Final Answer:

    ExecutionContext -> Option A
  4. Quick Check:

    Guards use ExecutionContext = C [OK]
Quick Trick: Guards use ExecutionContext to check requests [OK]
Common Mistakes:
  • Mixing guards with interceptors
  • Confusing pipes with guards
  • Assuming exception filters control access

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More NestJS Quizzes