From d425ccd24bd5390146d668fd82fa2026a7f6372a Mon Sep 17 00:00:00 2001 From: Firas Shmit Date: Fri, 17 Nov 2023 17:11:19 +0100 Subject: [PATCH] EW-644 modifed schulconnex error --- src/shared/error/schulconnex-validation-error.filter.ts | 2 +- src/shared/validation/global-validation.pipe.ts | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/shared/error/schulconnex-validation-error.filter.ts b/src/shared/error/schulconnex-validation-error.filter.ts index 2681ea953..9f14dd8d3 100644 --- a/src/shared/error/schulconnex-validation-error.filter.ts +++ b/src/shared/error/schulconnex-validation-error.filter.ts @@ -5,7 +5,7 @@ import { HttpArgumentsHost } from '@nestjs/common/interfaces/index.js'; import { Response } from 'express'; export type SchulConnexError = { - statusCode?: number; + statusCode: number; subCode: string; title: string; description: string; diff --git a/src/shared/validation/global-validation.pipe.ts b/src/shared/validation/global-validation.pipe.ts index c0fe78cbe..23ac3571a 100644 --- a/src/shared/validation/global-validation.pipe.ts +++ b/src/shared/validation/global-validation.pipe.ts @@ -21,7 +21,6 @@ export class GlobalValidationPipe extends ValidationPipe { whitelist: true, // only pass valid @ApiProperty-decorated DTO properties, remove others forbidNonWhitelisted: false, // additional params are just skipped (required when extracting multiple DTO from single query) forbidUnknownValues: true, - // TODO: create types for the exception factory: EW-??? exceptionFactory: (errors: ValidationError[]) => new DetailedValidationError(errors), }); }