NestJS · Senior · Question 62 of 75
How can Nest's ValidationPipe errors be made more useful to API clients?
- ✓Correct answer: Use
exceptionFactoryto return field-level errors in a consistent format (e.g. problem details with anerrorsarray) - 2Return a plain 500
- 3Return the raw
class-validatorobjects including internals
Explanation
Stable error shapes let front ends show messages next to the right fields.