mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +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:
@@ -214,6 +214,7 @@ export class ElasticSecurity implements INodeType {
|
||||
throw new NodeOperationError(
|
||||
this.getNode(),
|
||||
'Connector Type does not match the type of the connector in Connector Name',
|
||||
{ itemIndex: i },
|
||||
);
|
||||
}
|
||||
|
||||
@@ -386,6 +387,7 @@ export class ElasticSecurity implements INodeType {
|
||||
throw new NodeOperationError(
|
||||
this.getNode(),
|
||||
`Cannot add tag "${tagToAdd}" to case ID ${caseId} because this case already has this tag.`,
|
||||
{ itemIndex: i },
|
||||
);
|
||||
}
|
||||
|
||||
@@ -425,7 +427,7 @@ export class ElasticSecurity implements INodeType {
|
||||
} = await elasticSecurityApiRequest.call(this, 'GET', `/cases/${caseId}`) as IDataObject & { tags: string[] };
|
||||
|
||||
if (!tags.includes(tagToRemove)) {
|
||||
throw new NodeOperationError(this.getNode(), `Cannot remove tag "${tagToRemove}" from case ID ${caseId} because this case does not have this tag.`);
|
||||
throw new NodeOperationError(this.getNode(), `Cannot remove tag "${tagToRemove}" from case ID ${caseId} because this case does not have this tag.`, { itemIndex: i });
|
||||
}
|
||||
|
||||
const body = {};
|
||||
|
||||
Reference in New Issue
Block a user