Files
n8n-enterprise-unlocked/packages/workflow/src/errors/workflow-operation.error.ts
T

21 lines
574 B
TypeScript

import type { INode } from '..';
import { ExecutionBaseError } from './abstract/execution-base.error';
/**
* Class for instantiating an operational error, e.g. a timeout error.
*/
export class WorkflowOperationError extends ExecutionBaseError {
node: INode | undefined;
timestamp: number;
constructor(message: string, node?: INode, description?: string) {
super(message, { cause: undefined });
this.level = 'warning';
this.name = this.constructor.name;
if (description) this.description = description;
this.node = node;
this.timestamp = Date.now();
}
}