feat: Add item information to more node errors (#3681)
* ⚡ Add `itemIndex` to node-thrown errors * ⚡ Add some missing item indexes
This commit is contained in:
@@ -125,7 +125,7 @@ export class Iterable implements INodeType {
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
|
||||
if (!additionalFields.email && !additionalFields.id) {
|
||||
throw new NodeOperationError(this.getNode(), 'Either email or userId must be passed in to identify the user. Please add one of both via "Additional Fields". If both are passed in, email takes precedence.');
|
||||
throw new NodeOperationError(this.getNode(), 'Either email or userId must be passed in to identify the user. Please add one of both via "Additional Fields". If both are passed in, email takes precedence.', { itemIndex: i });
|
||||
}
|
||||
|
||||
const body: IDataObject = {
|
||||
@@ -194,7 +194,7 @@ export class Iterable implements INodeType {
|
||||
if (this.continueOnFail() === false) {
|
||||
if (responseData.code !== 'Success') {
|
||||
throw new NodeOperationError(this.getNode(),
|
||||
`Iterable error response [400]: ${responseData.msg}`,
|
||||
`Iterable error response [400]: ${responseData.msg}`, { itemIndex: i }
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user