diff --git a/packages/cli/src/workflow-runner.ts b/packages/cli/src/workflow-runner.ts index 973d512e62079..7675ed26516bd 100644 --- a/packages/cli/src/workflow-runner.ts +++ b/packages/cli/src/workflow-runner.ts @@ -67,7 +67,7 @@ export class WorkflowRunner { // // FIXME: This is a quick fix. The proper fix would be to not remove // the execution from the active executions while it's still running. - if (error instanceof ExecutionNotFoundError) { + if (error instanceof ExecutionNotFoundError || error instanceof ExecutionCancelledError) { return; } diff --git a/packages/core/src/error-reporter.ts b/packages/core/src/error-reporter.ts index b6fc936daaa7a..3599a962435e5 100644 --- a/packages/core/src/error-reporter.ts +++ b/packages/core/src/error-reporter.ts @@ -2,7 +2,12 @@ import type { NodeOptions } from '@sentry/node'; import { close } from '@sentry/node'; import type { ErrorEvent, EventHint } from '@sentry/types'; import { AxiosError } from 'axios'; -import { ApplicationError, LoggerProxy, type ReportingOptions } from 'n8n-workflow'; +import { + ApplicationError, + ExecutionCancelledError, + LoggerProxy, + type ReportingOptions, +} from 'n8n-workflow'; import { createHash } from 'node:crypto'; import { Service } from 'typedi'; @@ -142,6 +147,7 @@ export class ErrorReporter { } error(e: unknown, options?: ReportingOptions) { + if (e instanceof ExecutionCancelledError) return; const toReport = this.wrap(e); if (toReport) this.report(toReport, options); }