mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-19 11:01:15 +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:
@@ -177,7 +177,7 @@ export class Tapfiliate implements INodeType {
|
||||
const affiliateId = this.getNodeParameter('affiliateId', i) as string;
|
||||
const metadata = (this.getNodeParameter('metadataUi', i) as IDataObject || {}).metadataValues as IDataObject[] || [];
|
||||
if (metadata.length === 0) {
|
||||
throw new NodeOperationError(this.getNode(), 'Metadata cannot be empty.');
|
||||
throw new NodeOperationError(this.getNode(), 'Metadata cannot be empty.', { itemIndex: i });
|
||||
}
|
||||
for (const { key, value } of metadata) {
|
||||
await tapfiliateApiRequest.call(this, 'PUT', `/affiliates/${affiliateId}/meta-data/${key}/`, { value });
|
||||
|
||||
Reference in New Issue
Block a user