Skip to content

Commit

Permalink
fix(core): Fix canceled status for active production executions in …
Browse files Browse the repository at this point in the history
…scaling mode
  • Loading branch information
ivov committed Dec 23, 2024
1 parent fe7fb41 commit 85fb4d0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/cli/src/workflow-runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
8 changes: 7 additions & 1 deletion packages/core/src/error-reporter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit 85fb4d0

Please sign in to comment.