NestJS · Middle · Question 27 of 75

Where should database errors like unique violations be translated into HTTP errors?

Explanation

Never leak SQL or stack traces. A filter for ORM errors keeps the mapping in one place.

Further reading

Problem with a question

NestJS · Middle · question 27

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