diff --git a/service/cards.js b/service/cards.js index 4a835c7..8f27f8f 100644 --- a/service/cards.js +++ b/service/cards.js @@ -281,7 +281,7 @@ var cards = { } next(null, resultItem ); // pass control to the next handler }, - activateCard: async function (req, res, next) { + activateCard: function (req, res, next) { try { logger.info(req.body); @@ -323,16 +323,13 @@ var cards = { next(null, resultItem); // pass control to the next handler }); } - }); - } catch (e) { next(e.message, null); // pass control to the next handler } }); - } catch (error) { - await res.status(500).json({error: `Internal Server error 002 ${error} `}); + res.status(500).json({error: `Internal Server error 002 ${error} `}); }