report ExecutionNotFoundError only to sentry and the logs, not to the user

This commit is contained in:
Danny Martini 2024-09-18 18:12:49 +02:00
parent 0706149672
commit 9b0b0fbf57
No known key found for this signature in database

View file

@ -5,7 +5,12 @@ import type {
ExecutionStatus,
IWorkflowExecutionDataProcess,
} from 'n8n-workflow';
import { createDeferredPromise, ExecutionCancelledError, sleep } from 'n8n-workflow';
import {
createDeferredPromise,
ErrorReporterProxy,
ExecutionCancelledError,
sleep,
} from 'n8n-workflow';
import { strict as assert } from 'node:assert';
import type PCancelable from 'p-cancelable';
import { Service } from 'typedi';
@ -222,7 +227,7 @@ export class ActiveExecutions {
private getExecution(executionId: string): IExecutingWorkflowData {
const execution = this.activeExecutions[executionId];
if (!execution) {
throw new ExecutionNotFoundError(executionId);
ErrorReporterProxy.error(new ExecutionNotFoundError(executionId));
}
return execution;
}