mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
feat(core): Run Error Workflow also on trigger activation error (#3470)
* feat(core): Run Error Workflow also when workflow gets deactivated
or could not be activated on startup because of error
R#
* ⚡ Add missing file
This commit is contained in:
@@ -9,6 +9,7 @@ import { URLSearchParams } from 'url';
|
||||
import { IDeferredPromise } from './DeferredPromise';
|
||||
import { Workflow } from './Workflow';
|
||||
import { WorkflowHooks } from './WorkflowHooks';
|
||||
import { WorkflowActivationError } from './WorkflowActivationError';
|
||||
import { WorkflowOperationError } from './WorkflowErrors';
|
||||
import { NodeApiError, NodeOperationError } from './NodeErrors';
|
||||
|
||||
@@ -56,7 +57,11 @@ export interface IConnection {
|
||||
index: number;
|
||||
}
|
||||
|
||||
export type ExecutionError = WorkflowOperationError | NodeOperationError | NodeApiError;
|
||||
export type ExecutionError =
|
||||
| WorkflowActivationError
|
||||
| WorkflowOperationError
|
||||
| NodeOperationError
|
||||
| NodeApiError;
|
||||
|
||||
// Get used to gives nodes access to credentials
|
||||
export interface IGetCredentials {
|
||||
|
||||
16
packages/workflow/src/WorkflowActivationError.ts
Normal file
16
packages/workflow/src/WorkflowActivationError.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
// eslint-disable-next-line import/no-cycle
|
||||
import { ExecutionBaseError, INode } from '.';
|
||||
|
||||
/**
|
||||
* Class for instantiating an workflow activation error
|
||||
*/
|
||||
export class WorkflowActivationError extends ExecutionBaseError {
|
||||
node: INode | undefined;
|
||||
|
||||
constructor(message: string, error: Error, node?: INode) {
|
||||
super(error);
|
||||
this.node = node;
|
||||
this.cause = error;
|
||||
this.message = message;
|
||||
}
|
||||
}
|
||||
@@ -11,6 +11,7 @@ export * from './NodeErrors';
|
||||
export * as TelemetryHelpers from './TelemetryHelpers';
|
||||
export * from './RoutingNode';
|
||||
export * from './Workflow';
|
||||
export * from './WorkflowActivationError';
|
||||
export * from './WorkflowDataProxy';
|
||||
export * from './WorkflowErrors';
|
||||
export * from './WorkflowHooks';
|
||||
|
||||
Reference in New Issue
Block a user