From 36055032ba13a039e878718b9fec3b27769b0a45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20Ovejero?= Date: Wed, 23 Oct 2024 13:12:50 +0200 Subject: [PATCH] refactor(core): Debug malformed execution at 1.61.0 --- packages/@n8n/config/src/configs/sentry.config.ts | 4 +++- packages/cli/src/workflow-runner.ts | 8 ++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/packages/@n8n/config/src/configs/sentry.config.ts b/packages/@n8n/config/src/configs/sentry.config.ts index d1067f9984..8dcf71c271 100644 --- a/packages/@n8n/config/src/configs/sentry.config.ts +++ b/packages/@n8n/config/src/configs/sentry.config.ts @@ -4,7 +4,9 @@ import { Config, Env } from '../decorators'; export class SentryConfig { /** Sentry DSN for the backend. */ @Env('N8N_SENTRY_DSN') - backendDsn: string = ''; + backendDsn: string = + // https://n8nio.sentry.io/issues/?project=4504016528408576 + 'https://a257ce801ae971a3883d69c2e7c5e431@o1420875.ingest.us.sentry.io/4504016528408576'; /** Sentry DSN for the frontend . */ @Env('N8N_FRONTEND_SENTRY_DSN') diff --git a/packages/cli/src/workflow-runner.ts b/packages/cli/src/workflow-runner.ts index a4dd344b62..248b8ac3b7 100644 --- a/packages/cli/src/workflow-runner.ts +++ b/packages/cli/src/workflow-runner.ts @@ -15,6 +15,7 @@ import type { IWorkflowExecutionDataProcess, } from 'n8n-workflow'; import { + ApplicationError, ErrorReporterProxy as ErrorReporter, ExecutionCancelledError, Workflow, @@ -391,6 +392,13 @@ export class WorkflowRunner { let job: Job; let hooks: WorkflowHooks; try { + // check to help diagnose PAY-2100 + if (data.executionData?.executionData?.nodeExecutionStack?.length === 0) { + throw new ApplicationError('Execution to enqueue has empty node execution stack', { + extra: { executionData: data.executionData }, + }); + } + job = await this.scalingService.addJob(jobData, jobOptions); hooks = WorkflowExecuteAdditionalData.getWorkflowHooksWorkerMain(