From ceb8819b3b86d71e7e4340681469d13188e42c82 Mon Sep 17 00:00:00 2001 From: Roland Sadowski Date: Thu, 9 Jan 2025 10:50:36 +0000 Subject: [PATCH] minor edit --- src/middleware/common.middleware.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/middleware/common.middleware.js b/src/middleware/common.middleware.js index 91cd5ba9..8197ba6a 100644 --- a/src/middleware/common.middleware.js +++ b/src/middleware/common.middleware.js @@ -99,7 +99,7 @@ export function validateQueryParamsFn (req, res, next) { next() } catch (error) { const err = new MiddlewareError('Query params validation error', 400, { cause: error }) - res.status(400).render(err.template, { ...errorTemplateContext(), err }) + res.status(err.statusCode).render(err.template, { ...errorTemplateContext(), err }) } }