NestJS · Junior · Question 29 of 75
What does a pipe do in Nest?
- 1Sends logs to a file
- 2Connects two microservices
- ✓Correct answer: Transforms or validates handler arguments before the handler runs
Explanation
If validation fails, the pipe throws and the handler isn't called. Built-in pipes include ParseIntPipe, ParseUUIDPipe and ValidationPipe.