mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
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:
@@ -122,11 +122,11 @@ export class AwsTextract implements INodeType {
|
||||
const simple = this.getNodeParameter('simple', i) as boolean;
|
||||
|
||||
if (items[i].binary === undefined) {
|
||||
throw new NodeOperationError(this.getNode(), 'No binary data exists on item!');
|
||||
throw new NodeOperationError(this.getNode(), 'No binary data exists on item!', { itemIndex: i });
|
||||
}
|
||||
|
||||
if ((items[i].binary as IBinaryKeyData)[binaryProperty] === undefined) {
|
||||
throw new NodeOperationError(this.getNode(), `No binary data property "${binaryProperty}" does not exists on item!`);
|
||||
throw new NodeOperationError(this.getNode(), `No binary data property "${binaryProperty}" does not exists on item!`, { itemIndex: i });
|
||||
}
|
||||
|
||||
const binaryPropertyData = (items[i].binary as IBinaryKeyData)[binaryProperty];
|
||||
|
||||
Reference in New Issue
Block a user