mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
fix(core): Don't send a executionFinished event to the browser with no run data if the execution has already been cleaned up (#11502)
Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <aditya@netroy.in>
This commit is contained in:
@@ -35,6 +35,7 @@ import * as WorkflowHelpers from '@/workflow-helpers';
|
||||
import { generateFailedExecutionFromError } from '@/workflow-helpers';
|
||||
import { WorkflowStaticDataService } from '@/workflows/workflow-static-data.service';
|
||||
|
||||
import { ExecutionNotFoundError } from './errors/execution-not-found-error';
|
||||
import { EventService } from './events/event.service';
|
||||
|
||||
@Service()
|
||||
@@ -57,12 +58,21 @@ export class WorkflowRunner {
|
||||
|
||||
/** The process did error */
|
||||
async processError(
|
||||
error: ExecutionError,
|
||||
error: ExecutionError | ExecutionNotFoundError,
|
||||
startedAt: Date,
|
||||
executionMode: WorkflowExecuteMode,
|
||||
executionId: string,
|
||||
hooks?: WorkflowHooks,
|
||||
) {
|
||||
// This means the execution was probably cancelled and has already
|
||||
// been cleaned up.
|
||||
//
|
||||
// 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) {
|
||||
return;
|
||||
}
|
||||
|
||||
ErrorReporter.error(error, { executionId });
|
||||
|
||||
const isQueueMode = config.getEnv('executions.mode') === 'queue';
|
||||
|
||||
Reference in New Issue
Block a user