mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
feat(core): Add a warning to error workflows that cannot be started due to permission or settings (#6961)
Github issue / Community forum post (link here to close automatically): This PR aims to address an issue where an Error workflow cannot be started, either due to insufficient permissions or because its settings prevent it from being called. The way of addressing this is by creating a failed execution for the appointed error workflow stating the error, as can be seen below. This means the execution itself won't start, as it's prevented before the execution beings, but we save a "stub" execution to show the error. 
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
import type { INode } from './Interfaces';
|
||||
import { ExecutionBaseError } from './NodeErrors';
|
||||
|
||||
/**
|
||||
* Class for instantiating an operational error, e.g. a timeout error.
|
||||
*/
|
||||
export class WorkflowOperationError extends Error {
|
||||
export class WorkflowOperationError extends ExecutionBaseError {
|
||||
node: INode | undefined;
|
||||
|
||||
timestamp: number;
|
||||
@@ -13,7 +14,7 @@ export class WorkflowOperationError extends Error {
|
||||
description: string | undefined;
|
||||
|
||||
constructor(message: string, node?: INode) {
|
||||
super(message);
|
||||
super(message, { cause: undefined });
|
||||
this.name = this.constructor.name;
|
||||
this.node = node;
|
||||
this.timestamp = Date.now();
|
||||
|
||||
Reference in New Issue
Block a user