fix(Execute Workflow Node): Continue on fail behaviour not correctly implemented (#9890)

This commit is contained in:
Shireen Missi 2024-07-01 16:25:01 +01:00 committed by GitHub
parent 41c47a28a9
commit 16b1a094b1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -231,7 +231,11 @@ export class ExecuteWorkflow implements INodeType {
}
} catch (error) {
if (this.continueOnFail(error)) {
return [[{ json: { error: error.message }, pairedItem: { item: i } }]];
if (returnData[i] === undefined) {
returnData[i] = [];
}
returnData[i].push({ json: { error: error.message }, pairedItem: { item: i } });
continue;
}
throw new NodeOperationError(this.getNode(), error, {
message: `Error executing workflow with item at index ${i}`,