diff --git a/packages/cli/src/ErrorReporting.ts b/packages/cli/src/ErrorReporting.ts index 0388be4fc0..e9059e71ba 100644 --- a/packages/cli/src/ErrorReporting.ts +++ b/packages/cli/src/ErrorReporting.ts @@ -7,7 +7,8 @@ let initialized = false; export const initErrorHandling = async () => { if (initialized) return; - if (!config.getEnv('diagnostics.enabled')) { + const dsn = config.getEnv('diagnostics.config.sentry.dsn'); + if (!config.getEnv('diagnostics.enabled') || !dsn) { initialized = true; return; } @@ -15,7 +16,6 @@ export const initErrorHandling = async () => { // Collect longer stacktraces Error.stackTraceLimit = 50; - const dsn = config.getEnv('diagnostics.config.sentry.dsn'); const { N8N_VERSION: release, ENVIRONMENT: environment } = process.env; const { init, captureException, addGlobalEventProcessor } = await import('@sentry/node'); diff --git a/packages/cli/src/config/schema.ts b/packages/cli/src/config/schema.ts index 685a09a4da..74e4ae67ef 100644 --- a/packages/cli/src/config/schema.ts +++ b/packages/cli/src/config/schema.ts @@ -1013,8 +1013,7 @@ export const schema = { dsn: { doc: 'Data source name for error tracking on Sentry', format: String, - default: - 'https://1f954e089a054b8e943ae4f4042b2bff@o1420875.ingest.sentry.io/4504016528408576', + default: '', env: 'N8N_SENTRY_DSN', }, },