NestJS · Middle · Question 7 of 75

How can an interceptor wrap every response in { data: ... }?

Explanation

Interceptors are the place for cross-cutting response changes. Be consistent: errors are shaped by exception filters, not interceptors.

Further reading

Problem with a question

NestJS · Middle · question 7

Test yourself

Take the NestJS · Middle quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz