From fcfba08b64a628e6142d9dd208e405b0e79ceafc Mon Sep 17 00:00:00 2001 From: legonzaur Date: Thu, 16 Mar 2023 09:52:23 +0100 Subject: [PATCH] console body on validation fail --- src/common.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common.ts b/src/common.ts index a6c4834..040da85 100644 --- a/src/common.ts +++ b/src/common.ts @@ -35,7 +35,7 @@ export function GetRequest(url: string) { export const validateErrors: RequestHandler = (req, res, next) => { const errors = validationResult(req) if (!errors.isEmpty()) { - console.error(JSON.stringify(errors)) + console.error(JSON.stringify(errors), 'body', req.body, 'query', req.params) return res.status(400).json({ errors: errors.array() }) } next()