mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-25 04:34:06 -08: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:
parent
12a89e6d14
commit
87996a1fcf
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue