From f2bd4aec39ca98ef39da9767fb3a011b0f8ccbe4 Mon Sep 17 00:00:00 2001 From: Maidul Islam Date: Sun, 1 Jan 2023 13:13:03 -0500 Subject: [PATCH] Show full validation error --- backend/src/middleware/validateRequest.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/middleware/validateRequest.ts b/backend/src/middleware/validateRequest.ts index 3bc106189..1b0364766 100644 --- a/backend/src/middleware/validateRequest.ts +++ b/backend/src/middleware/validateRequest.ts @@ -15,7 +15,7 @@ const validate = (req: Request, res: Response, next: NextFunction) => { try { const errors = validationResult(req); if (!errors.isEmpty()) { - return next(ValidationError({ context: { errors: `One or more of your paramters are invalid [error=${errors.array}]` } })) + return next(ValidationError({ context: { errors: `One or more of your parameters are invalid [error(s)=${(JSON.stringify(errors))}]` } })) } return next();