diff --git a/lib/tasks/config.js b/lib/tasks/config.js index 2c84665b..e2d1fd31 100644 --- a/lib/tasks/config.js +++ b/lib/tasks/config.js @@ -146,7 +146,11 @@ class TaskConfig extends Task { _onAmdEvent(cs, evt) { this.logger.info({evt}, 'Config:_onAmdEvent'); const {actionHook} = this.data.amd; - this.performHook(cs, actionHook, evt); + this.performHook(cs, actionHook, evt) + .catch((err) => { + this.logger.error({err}, 'Config:_onAmdEvent - error calling actionHook'); + }); + } } diff --git a/lib/tasks/dial.js b/lib/tasks/dial.js index 76eaa483..2fa32534 100644 --- a/lib/tasks/dial.js +++ b/lib/tasks/dial.js @@ -689,7 +689,10 @@ class TaskDial extends Task { _onAmdEvent(cs, evt) { this.logger.info({evt}, 'Dial:_onAmdEvent'); const {actionHook} = this.data.amd; - this.performHook(cs, actionHook, evt); + this.performHook(cs, actionHook, evt) + .catch((err) => { + this.logger.error({err}, 'Dial:_onAmdEvent - error calling actionHook'); + }); } } diff --git a/lib/utils/http-listener.js b/lib/utils/http-listener.js index f9fd9e61..5674b418 100644 --- a/lib/utils/http-listener.js +++ b/lib/utils/http-listener.js @@ -21,6 +21,7 @@ const handleErrors = (logger, app, resolve, reject, e) => { server.on('error', handleErrors.bind(null, logger, app, resolve, reject)); return; } + logger.info({err: e, port: PORT}, 'httpListener error'); reject(e); }; @@ -30,7 +31,7 @@ const createHttpListener = (logger, srf) => { app.use(express.urlencoded({ extended: true })); app.use(express.json()); app.use('/', httpRoutes); - app.use((err, req, res, next) => { + app.use((err, _req, res, _next) => { logger.error(err, 'burped error'); res.status(err.status || 500).json({msg: err.message}); });