mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-19 19:11:13 +00:00
fix(core): Replace misleading "No path back to node" error with helpful execution message (#17759)
This commit is contained in:
@@ -1080,7 +1080,13 @@ export class WorkflowDataProxy {
|
||||
!that?.runExecutionData?.resultData?.runData.hasOwnProperty(nodeName) &&
|
||||
!getPinDataIfManualExecution(that.workflow, nodeName, that.mode)
|
||||
) {
|
||||
throw createNodeReferenceError(nodeName);
|
||||
// Always show helpful "Execute node for preview" message
|
||||
throw new ExpressionError(EXPRESSION_ERROR_MESSAGES.NO_EXECUTION_DATA, {
|
||||
messageTemplate: `Execute node "${nodeName}" for preview`,
|
||||
nodeCause: nodeName,
|
||||
runIndex: that.runIndex,
|
||||
itemIndex: that.itemIndex,
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1098,7 +1104,10 @@ export class WorkflowDataProxy {
|
||||
contextNode = parentMainInputNode?.name ?? contextNode;
|
||||
}
|
||||
|
||||
if (!that.workflow.hasPath(nodeName, contextNode)) {
|
||||
// For .first(), .last(), .all() methods, use unidirectional path checking
|
||||
// (forward only) to maintain traditional paired item behavior
|
||||
const hasForwardPath = that.workflow.getChildNodes(nodeName).includes(contextNode);
|
||||
if (!hasForwardPath) {
|
||||
throw createNodeReferenceError(nodeName);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user