Add clarifying comment
This commit is contained in:
@@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user