We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2498fdd commit e4c41dcCopy full SHA for e4c41dc
generators/auth/templates/mongodb/jwt/src/exceptions/validation.exceptions.ts
@@ -1,9 +1,7 @@
1
import { BadRequestException, ValidationError } from '@nestjs/common';
2
3
function transform(errors: ValidationError[]) {
4
- return errors.map((error) => {
5
- return Object.values(error.constraints) ?? [];
6
- });
+ return errors.map((error) => (error.constraints ? Object.values(error.constraints) : []));
7
}
8
9
export default class ValidationExceptions extends BadRequestException {
0 commit comments