mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +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:
@@ -225,7 +225,7 @@ export class Trello implements INodeType {
|
||||
Object.assign(qs, updateFields);
|
||||
|
||||
} else {
|
||||
throw new NodeOperationError(this.getNode(), `The operation "${operation}" is not known!`);
|
||||
throw new NodeOperationError(this.getNode(), `The operation "${operation}" is not known!`, { itemIndex: i });
|
||||
}
|
||||
} else if (resource === 'boardMember') {
|
||||
if (operation === 'getAll') {
|
||||
@@ -287,7 +287,7 @@ export class Trello implements INodeType {
|
||||
endpoint = `boards/${id}/members/${idMember}`;
|
||||
|
||||
} else {
|
||||
throw new NodeOperationError(this.getNode(), `The operation "${operation}" is not known!`);
|
||||
throw new NodeOperationError(this.getNode(), `The operation "${operation}" is not known!`, { itemIndex: i });
|
||||
}
|
||||
} else if (resource === 'card') {
|
||||
|
||||
@@ -347,7 +347,7 @@ export class Trello implements INodeType {
|
||||
Object.assign(qs, updateFields);
|
||||
|
||||
} else {
|
||||
throw new NodeOperationError(this.getNode(), `The operation "${operation}" is not known!`);
|
||||
throw new NodeOperationError(this.getNode(), `The operation "${operation}" is not known!`, { itemIndex: i });
|
||||
}
|
||||
|
||||
} else if (resource === 'cardComment') {
|
||||
@@ -395,7 +395,7 @@ export class Trello implements INodeType {
|
||||
endpoint = `cards/${cardId}/actions/${commentId}/comments`;
|
||||
|
||||
} else {
|
||||
throw new NodeOperationError(this.getNode(), `The operation "${operation}" is not known!`);
|
||||
throw new NodeOperationError(this.getNode(), `The operation "${operation}" is not known!`, { itemIndex: i });
|
||||
}
|
||||
|
||||
} else if (resource === 'list') {
|
||||
@@ -496,7 +496,7 @@ export class Trello implements INodeType {
|
||||
Object.assign(qs, updateFields);
|
||||
|
||||
} else {
|
||||
throw new NodeOperationError(this.getNode(), `The operation "${operation}" is not known!`);
|
||||
throw new NodeOperationError(this.getNode(), `The operation "${operation}" is not known!`, { itemIndex: i });
|
||||
}
|
||||
|
||||
} else if (resource === 'attachment') {
|
||||
@@ -561,7 +561,7 @@ export class Trello implements INodeType {
|
||||
const additionalFields = this.getNodeParameter('additionalFields', i) as IDataObject;
|
||||
Object.assign(qs, additionalFields);
|
||||
} else {
|
||||
throw new NodeOperationError(this.getNode(), `The operation "${operation}" is not known!`);
|
||||
throw new NodeOperationError(this.getNode(), `The operation "${operation}" is not known!`, { itemIndex: i });
|
||||
}
|
||||
|
||||
} else if (resource === 'checklist') {
|
||||
@@ -695,7 +695,7 @@ export class Trello implements INodeType {
|
||||
Object.assign(qs, additionalFields);
|
||||
|
||||
} else {
|
||||
throw new NodeOperationError(this.getNode(), `The operation "${operation}" is not known!`);
|
||||
throw new NodeOperationError(this.getNode(), `The operation "${operation}" is not known!`, { itemIndex: i });
|
||||
}
|
||||
} else if (resource === 'label') {
|
||||
|
||||
@@ -798,10 +798,10 @@ export class Trello implements INodeType {
|
||||
endpoint = `/cards/${cardId}/idLabels/${id}`;
|
||||
|
||||
} else {
|
||||
throw new NodeOperationError(this.getNode(), `The operation "${operation}" is not known!`);
|
||||
throw new NodeOperationError(this.getNode(), `The operation "${operation}" is not known!`, { itemIndex: i });
|
||||
}
|
||||
} else {
|
||||
throw new NodeOperationError(this.getNode(), `The resource "${resource}" is not known!`);
|
||||
throw new NodeOperationError(this.getNode(), `The resource "${resource}" is not known!`, { itemIndex: i });
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user