From 9cb5d898f49ae327dc2c7df90fba99f037f90128 Mon Sep 17 00:00:00 2001 From: Sathishkumar Krishnan Date: Mon, 27 Dec 2021 12:23:41 +0530 Subject: [PATCH] fix: added success flag to err handler --- src/controller/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controller/index.js b/src/controller/index.js index 138e5fd..64bc9dd 100644 --- a/src/controller/index.js +++ b/src/controller/index.js @@ -30,7 +30,7 @@ router.get("/", (req, res) => { router.use(function (err, req, res, next) { console.error(err.stack); - res.status(500).send({ error: `Error: ${err.message}` }); + res.status(500).send({ success: false, error: `Error: ${err.message}` }); }); module.exports = { router };