fix: Increment runIndex in WorkflowToolV2 tool executions to avoid reusing out of date inputs (#13008)

This commit is contained in:
Charlie Kolb
2025-02-04 13:02:50 +01:00
committed by GitHub
parent fdcff9082b
commit cc907fbca9
2 changed files with 12 additions and 3 deletions

View File

@@ -90,6 +90,9 @@ export class WorkflowToolService {
const errorResponse = `There was an error: "${executionError.message}"`;
void this.context.addOutputData(NodeConnectionType.AiTool, index, executionError);
return errorResponse;
} finally {
// @ts-expect-error this accesses a private member on the actual implementation to fix https://linear.app/n8n/issue/ADO-3186/bug-workflowtool-v2-always-uses-first-row-of-input-data
this.context.runIndex++;
}
};