From 6a2c451105e5b339b4101cbd2211a0ab407d508a Mon Sep 17 00:00:00 2001 From: Phill Pover Date: Mon, 7 Apr 2025 10:50:52 +0100 Subject: [PATCH] Pushing errors back to frontend --- backend/src/main.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/backend/src/main.ts b/backend/src/main.ts index 70cc327..58f0758 100644 --- a/backend/src/main.ts +++ b/backend/src/main.ts @@ -1,5 +1,9 @@ import { NestFactory } from '@nestjs/core'; -import { UnprocessableEntityException, ValidationError, ValidationPipe } from '@nestjs/common'; +import { + UnprocessableEntityException, + ValidationError, + ValidationPipe, +} from '@nestjs/common'; import { AppModule } from './app.module'; async function bootstrap() { @@ -22,7 +26,7 @@ async function bootstrap() { validationErrors: ValidationError[], parentProperty = '', ): Array<{ property: string; errors: string[] }> => { - const errors : any[] = []; + const errors: Array<{ property: string; errors: string[] }> = []; const getValidationErrorsRecursively = ( validationErrors: ValidationError[],