Avoid crashing in NodeJS 17 due to Unhandled promise rejection

This commit is contained in:
ngosang 2022-02-06 13:31:30 +01:00
parent cd221bbbf1
commit 2893f72237

View File

@ -39,6 +39,11 @@ process.on('SIGTERM', () => {
process.exit(0)
})
process.on('uncaughtException', function(err) {
// Avoid crashing in NodeJS 17 due to UnhandledPromiseRejectionWarning: Unhandled promise rejection.
log.error(err)
})
validateEnvironmentVariables();
testWebBrowserInstallation().then(() => {