mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 10:31:15 +00:00
fix(core): Log crash causes to console when sentry is disabled (#6890)
This commit is contained in:
committed by
GitHub
parent
dceff675ec
commit
6553d92c7c
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user