refactor(core): Make Sentry init non-fatal for JS runner (#22800)

This commit is contained in:
Iván Ovejero
2025-12-05 12:50:47 +01:00
committed by GitHub
parent 79fd0b5d40
commit 08729ce6c6

View File

@@ -54,7 +54,15 @@ void (async function start() {
});
sentry = Container.get(TaskRunnerSentry);
await sentry.initIfEnabled();
try {
await sentry.initIfEnabled();
} catch (error) {
console.error(
'FAILED TO INITIALIZE SENTRY. ERROR REPORTING WILL BE DISABLED. THIS IS LIKELY A CONFIGURATION OR ENVIRONMENT ISSUE.',
error,
);
sentry = undefined;
}
runner = new JsTaskRunner(config);
runner.on('runner:reached-idle-timeout', () => {