From 2a7f512c55aedd9f9c35268b7728ea707106485f Mon Sep 17 00:00:00 2001 From: Sreejith N Subramanian Date: Tue, 6 Oct 2020 22:04:46 +0530 Subject: [PATCH] Fix for wrongly handled jwt error Previously the Error wasn't handled completely and was passed on. That ended up throwing the entire Error as html to response. Which exposed the source files and line numbers. --- app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.js b/app.js index cd7c5d1..0a2aeea 100644 --- a/app.js +++ b/app.js @@ -50,7 +50,7 @@ app.all("*", function(req, res) { app.use((err, req, res) => { if(err.name == "UnauthorizedError"){ - return apiResponse.unauthorizedResponse(res, err.message); + apiResponse.unauthorizedResponse(res, err.message); } });