From 26f52ed166c9730d22d857957354e3944288f26e Mon Sep 17 00:00:00 2001 From: Omar Ajoue Date: Wed, 29 Jun 2022 14:55:31 +0200 Subject: [PATCH] Add clarifying comment --- nodes/ExampleNode/ExampleNode.node.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nodes/ExampleNode/ExampleNode.node.ts b/nodes/ExampleNode/ExampleNode.node.ts index 81e9d53..d7e111f 100644 --- a/nodes/ExampleNode/ExampleNode.node.ts +++ b/nodes/ExampleNode/ExampleNode.node.ts @@ -55,7 +55,9 @@ export class ExampleNode implements INodeType { items.push({json: this.getInputData(itemIndex)[0].json, error}); } else { // 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; throw error; }