diff --git a/lib/index.js b/lib/index.js index 891916800..6929936b3 100644 --- a/lib/index.js +++ b/lib/index.js @@ -49,6 +49,10 @@ module.exports = function(config_hash) { } } else { Logger.logger.error({err: err}, 'unexpected error: @{!err.message}\n@{err.stack}') + if (!res.status || !res.send) { + Logger.logger.error('this is an error in express.js, please report this') + res.destroy() + } if (calls == 1) { res.status(500) res.send({error: 'internal server error'})