diff --git a/services/document-updater/app.js b/services/document-updater/app.js index 8e400950b0..e55bcdb443 100644 --- a/services/document-updater/app.js +++ b/services/document-updater/app.js @@ -299,6 +299,11 @@ for (const signal of [ process.on(signal, shutdownCleanly(signal)) } +process.on('uncaughtException', function (err) { + logger.error({ err }, 'uncaught exception') + shutdownCleanly('uncaughtException')() +}) + function longerTimeout(req, res, next) { res.setTimeout(6 * 60 * 1000) next()