Add clarifying comment

This commit is contained in:
Omar Ajoue 2022-06-29 14:55:31 +02:00
commit 26f52ed166

View file

@ -55,7 +55,9 @@ export class ExampleNode implements INodeType {
items.push({json: this.getInputData(itemIndex)[0].json, error}); items.push({json: this.getInputData(itemIndex)[0].json, error});
} else { } else {
// Adding `itemIndex` allows other workflows to handle this error // Adding `itemIndex` allows other workflows to handle this error
if (error.context) { if (error.context) {
// If the error thrown already contains the context property,
// only append the itemIndex
error.context.itemIndex = itemIndex; error.context.itemIndex = itemIndex;
throw error; throw error;
} }