diff --git a/deploy/catchError.js b/deploy/catchError.js index e2dba558a3c7d8c4e7a9c3853eb678fc75991ae1..f78a429197d05cddf59c134ab380a9e300e25497 100644 --- a/deploy/catchError.js +++ b/deploy/catchError.js @@ -1,7 +1,11 @@ -module.exports = ({code = 500, error = 'an error had occured'}, req, res, next) => { +module.exports = ({code = 500, error = 'an error had occured', trace = 'undefined trace'}, req, res, next) => { /** * probably use more elaborate logging? */ - console.log('Catching error', JSON.stringify(error)) + console.log('Catching error', { + code, + error, + trace + }) res.sendStatus(code) } \ No newline at end of file diff --git a/deploy/nehubaConfig/index.js b/deploy/nehubaConfig/index.js index 1ae4c77b9b2107eb570a731b6bef29cd2ba06711..a5072c82865d230eb8d5320c028d5f9505ec1e38 100644 --- a/deploy/nehubaConfig/index.js +++ b/deploy/nehubaConfig/index.js @@ -7,7 +7,6 @@ const nehubaConfigRouter = express.Router() nehubaConfigRouter.get('/:configId', (req, res, next) => { const { configId } = req.params - console.log('nehubaconfigrouter') getTemplateNehubaConfig(configId) .then(data => res.status(200).send(data)) .catch(error => next({