From d5936d856606d7b95cae817737161c807cefd8e2 Mon Sep 17 00:00:00 2001 From: Jakob Ackermann Date: Mon, 26 Jan 2026 16:37:01 +0000 Subject: [PATCH] [document-updater] trigger graceful shutdown on unhandled error (#31027) GitOrigin-RevId: dde99528bfbc1d33f392a52fa8eaf5d4e82266b3 --- services/document-updater/app.js | 5 +++++ 1 file changed, 5 insertions(+) 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()