mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-16 17:46:45 +00:00
refactor(core): Stop reporting non-error to sentry (issue 4229454473) (no-changelog) (#7525)
This PR aims to stop reporting issues such as [this one](https://n8nio.sentry.io/issues/4229454473/events/42b96bfd6a334c15a84499e981cf90eb/?project=4503924908883968). Github issue / Community forum post (link here to close automatically):
This commit is contained in:
@@ -7,7 +7,7 @@ import type {
|
||||
IRun,
|
||||
ExecutionStatus,
|
||||
} from 'n8n-workflow';
|
||||
import { createDeferredPromise } from 'n8n-workflow';
|
||||
import { WorkflowOperationError, createDeferredPromise } from 'n8n-workflow';
|
||||
|
||||
import type { ChildProcess } from 'child_process';
|
||||
import type PCancelable from 'p-cancelable';
|
||||
@@ -190,13 +190,13 @@ export class ActiveExecutions {
|
||||
* @param {string} executionId The id of the execution to wait for
|
||||
*/
|
||||
async getPostExecutePromise(executionId: string): Promise<IRun | undefined> {
|
||||
if (this.activeExecutions[executionId] === undefined) {
|
||||
throw new WorkflowOperationError(`There is no active execution with id "${executionId}".`);
|
||||
}
|
||||
|
||||
// Create the promise which will be resolved when the execution finished
|
||||
const waitPromise = await createDeferredPromise<IRun | undefined>();
|
||||
|
||||
if (this.activeExecutions[executionId] === undefined) {
|
||||
throw new Error(`There is no active execution with id "${executionId}".`);
|
||||
}
|
||||
|
||||
this.activeExecutions[executionId].postExecutePromises.push(waitPromise);
|
||||
|
||||
return waitPromise.promise();
|
||||
|
||||
@@ -15,6 +15,7 @@ export class WorkflowOperationError extends ExecutionBaseError {
|
||||
|
||||
constructor(message: string, node?: INode) {
|
||||
super(message, { cause: undefined });
|
||||
this.severity = 'warning';
|
||||
this.name = this.constructor.name;
|
||||
this.node = node;
|
||||
this.timestamp = Date.now();
|
||||
|
||||
Reference in New Issue
Block a user