NestJS · Senior · Question 52 of 75
What's a pitfall of @Res() without passthrough in interceptors and filters?
- ✓Correct answer: The handler sends the response itself, so interceptors that transform the return value and Nest's response handling are bypassed
- 2It disables guards
- 3It makes the route public
Explanation
Streaming downloads are a valid reason to use @Res(); otherwise prefer returning values or StreamableFile.