From f4f9e4861dd6409c9e139355fb8d8dea9414de6f Mon Sep 17 00:00:00 2001 From: Joel Alejandro Villarreal Bertoldi Date: Tue, 12 Dec 2023 18:24:28 -0300 Subject: [PATCH] Update json-api-express.ts --- src/middlewares/json-api-express.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/middlewares/json-api-express.ts b/src/middlewares/json-api-express.ts index fccdae8..83eb894 100644 --- a/src/middlewares/json-api-express.ts +++ b/src/middlewares/json-api-express.ts @@ -51,7 +51,7 @@ export default function jsonApiExpress( try { await authenticate(appInstance, req); } catch (error) { - res.status(Number(error.status)).json(convertErrorToHttpResponse(error)); + res.status(+error.status).json(convertErrorToHttpResponse(error)); return next(); }