mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
fix(core): Account for pre-execution failure in scaling mode (#12815)
This commit is contained in:
7
packages/core/src/errors/workflow-has-issues.error.ts
Normal file
7
packages/core/src/errors/workflow-has-issues.error.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
import { WorkflowOperationError } from 'n8n-workflow';
|
||||
|
||||
export class WorkflowHasIssuesError extends WorkflowOperationError {
|
||||
constructor() {
|
||||
super('The workflow has issues and cannot be executed for that reason. Please fix them first.');
|
||||
}
|
||||
}
|
||||
@@ -44,7 +44,6 @@ import type {
|
||||
} from 'n8n-workflow';
|
||||
import {
|
||||
LoggerProxy as Logger,
|
||||
WorkflowOperationError,
|
||||
NodeHelpers,
|
||||
NodeConnectionType,
|
||||
ApplicationError,
|
||||
@@ -56,6 +55,7 @@ import {
|
||||
import PCancelable from 'p-cancelable';
|
||||
|
||||
import { ErrorReporter } from '@/errors/error-reporter';
|
||||
import { WorkflowHasIssuesError } from '@/errors/workflow-has-issues.error';
|
||||
import * as NodeExecuteFunctions from '@/node-execute-functions';
|
||||
|
||||
import { ExecuteContext, PollContext } from './node-execution-context';
|
||||
@@ -1246,9 +1246,7 @@ export class WorkflowExecute {
|
||||
pinDataNodeNames,
|
||||
});
|
||||
if (workflowIssues !== null) {
|
||||
throw new WorkflowOperationError(
|
||||
'The workflow has issues and cannot be executed for that reason. Please fix them first.',
|
||||
);
|
||||
throw new WorkflowHasIssuesError();
|
||||
}
|
||||
|
||||
// Variables which hold temporary data for each node-execution
|
||||
|
||||
@@ -12,6 +12,7 @@ export * from './instance-settings';
|
||||
export * from './logging';
|
||||
export * from './nodes-loader';
|
||||
export * from './utils';
|
||||
export { WorkflowHasIssuesError } from './errors/workflow-has-issues.error';
|
||||
|
||||
export * from './interfaces';
|
||||
export * from './node-execute-functions';
|
||||
|
||||
Reference in New Issue
Block a user