use logger instead of console for uncaughtException debug lines

This commit is contained in:
Hazelnoot 2025-07-07 11:44:48 -04:00
parent b38351e28a
commit 637fa254e5

View file

@ -66,13 +66,13 @@ async function main() {
process.on('uncaughtException', (err) => {
// Workaround for https://github.com/node-fetch/node-fetch/issues/954
if (String(err).match(/^TypeError: .+ is an? url with embedded credentials.$/)) {
console.debug('Suppressed node-fetch issue#954, but the current job may fail.');
logger.debug('Suppressed node-fetch issue#954, but the current job may fail.');
return;
}
// Workaround for https://github.com/node-fetch/node-fetch/issues/1845
if (String(err) === 'TypeError: Cannot read properties of undefined (reading \'body\')') {
console.debug('Suppressed node-fetch issue#1845, but the current job may fail.');
logger.debug('Suppressed node-fetch issue#1845, but the current job may fail.');
return;
}