mirror of
https://github.com/n8n-io/n8n.git
synced 2025-02-20 18:49:27 -08:00
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):
43 lines
993 B
TypeScript
43 lines
993 B
TypeScript
import type { INode } from './Interfaces';
|
|
import { ExecutionBaseError } from './NodeErrors';
|
|
|
|
/**
|
|
* Class for instantiating an operational error, e.g. a timeout error.
|
|
*/
|
|
export class WorkflowOperationError extends ExecutionBaseError {
|
|
node: INode | undefined;
|
|
|
|
timestamp: number;
|
|
|
|
lineNumber: number | undefined;
|
|
|
|
description: string | undefined;
|
|
|
|
constructor(message: string, node?: INode) {
|
|
super(message, { cause: undefined });
|
|
this.severity = 'warning';
|
|
this.name = this.constructor.name;
|
|
this.node = node;
|
|
this.timestamp = Date.now();
|
|
}
|
|
}
|
|
|
|
export class SubworkflowOperationError extends WorkflowOperationError {
|
|
description = '';
|
|
|
|
cause: { message: string; stack: string };
|
|
|
|
constructor(message: string, description: string) {
|
|
super(message);
|
|
this.name = this.constructor.name;
|
|
this.description = description;
|
|
|
|
this.cause = {
|
|
message,
|
|
stack: this.stack as string,
|
|
};
|
|
}
|
|
}
|
|
|
|
export class CliWorkflowOperationError extends SubworkflowOperationError {}
|