mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-19 11:01:15 +00:00
refactor(core): Port nodes config (no-changelog) (#10140)
Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <aditya@netroy.in>
This commit is contained in:
@@ -72,8 +72,7 @@ import { UrlService } from './services/url.service';
|
||||
import { WorkflowExecutionService } from './workflows/workflowExecution.service';
|
||||
import { MessageEventBus } from '@/eventbus/MessageEventBus/MessageEventBus';
|
||||
import { EventService } from './eventbus/event.service';
|
||||
|
||||
const ERROR_TRIGGER_TYPE = config.getEnv('nodes.errorTriggerType');
|
||||
import { GlobalConfig } from '@n8n/config';
|
||||
|
||||
export function objectToError(errorObject: unknown, workflow: Workflow): Error {
|
||||
// TODO: Expand with other error types
|
||||
@@ -176,6 +175,7 @@ export function executeErrorWorkflow(
|
||||
};
|
||||
}
|
||||
|
||||
const { errorTriggerType } = Container.get(GlobalConfig).nodes;
|
||||
// Run the error workflow
|
||||
// To avoid an infinite loop do not run the error workflow again if the error-workflow itself failed and it is its own error-workflow.
|
||||
const { errorWorkflow } = workflowData.settings ?? {};
|
||||
@@ -220,7 +220,7 @@ export function executeErrorWorkflow(
|
||||
} else if (
|
||||
mode !== 'error' &&
|
||||
workflowId !== undefined &&
|
||||
workflowData.nodes.some((node) => node.type === ERROR_TRIGGER_TYPE)
|
||||
workflowData.nodes.some((node) => node.type === errorTriggerType)
|
||||
) {
|
||||
logger.verbose('Start internal error workflow', { executionId, workflowId });
|
||||
void Container.get(OwnershipService)
|
||||
|
||||
Reference in New Issue
Block a user