diff --git a/backend/src/main.ts b/backend/src/main.ts index 761f105..e9246d4 100644 --- a/backend/src/main.ts +++ b/backend/src/main.ts @@ -1,5 +1,5 @@ import { NestFactory } from '@nestjs/core'; -import { UnprocessableEntityException, ValidationError, ValidationPipe } from '@nestjs/common'; +import { BadRequestException, ValidationError, ValidationPipe } from '@nestjs/common'; import { AppModule } from './app.module'; async function bootstrap() { @@ -47,7 +47,7 @@ async function bootstrap() { return errors; }; const errors = getPrettyClassValidatorErrors(validationErrors); - return new UnprocessableEntityException({ + return new BadRequestException({ message: 'validation error', errors: errors, });