From f487034430d260386b0b6d7b9a995a7f9295535d Mon Sep 17 00:00:00 2001 From: sriramv Date: Thu, 20 Jul 2023 10:45:09 +0530 Subject: [PATCH] catch issue:GWM --- app/controllers/financial.controller.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/controllers/financial.controller.js b/app/controllers/financial.controller.js index c9bef88..447596a 100644 --- a/app/controllers/financial.controller.js +++ b/app/controllers/financial.controller.js @@ -56,8 +56,8 @@ exports.MasterDatas = async (req, res) => { exports.MenuList = async (req, res) => { - Sync(function() - { + // Sync(function() + // { try { const losid = req.query.losid; @@ -258,8 +258,8 @@ exports.MenuList = async (req, res) => { res.send({'status':404,'message':"failed",'data':"data not found"}); } - }); // end of findall EntitiesData - }); // end of findall masters datas + }).catch(err => { logMsg.info(err); }); // end of findall EntitiesData + }).catch(err => { logMsg.info(err); }); // end of findall masters datas }); @@ -268,7 +268,7 @@ exports.MenuList = async (req, res) => { message: err.message || "Some error occurred while inserting statements." ,'data': "No data" }); } // end of try catch - }); // end of sync function + // }); // end of sync function };