mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
fix(HTTP Request Node): Fix itemIndex in HTTP Request errors (#5991)
This commit is contained in:
@@ -1176,7 +1176,7 @@ export class HttpRequestV3 implements INodeType {
|
||||
this.getNode(),
|
||||
'JSON parameter need to be an valid JSON',
|
||||
{
|
||||
runIndex: itemIndex,
|
||||
itemIndex,
|
||||
},
|
||||
);
|
||||
}
|
||||
@@ -1242,7 +1242,7 @@ export class HttpRequestV3 implements INodeType {
|
||||
this.getNode(),
|
||||
'JSON parameter need to be an valid JSON',
|
||||
{
|
||||
runIndex: itemIndex,
|
||||
itemIndex,
|
||||
},
|
||||
);
|
||||
}
|
||||
@@ -1264,7 +1264,7 @@ export class HttpRequestV3 implements INodeType {
|
||||
this.getNode(),
|
||||
'JSON parameter need to be an valid JSON',
|
||||
{
|
||||
runIndex: itemIndex,
|
||||
itemIndex,
|
||||
},
|
||||
);
|
||||
}
|
||||
@@ -1381,7 +1381,7 @@ export class HttpRequestV3 implements INodeType {
|
||||
if (autoDetectResponseFormat && response.reason.error instanceof Buffer) {
|
||||
response.reason.error = Buffer.from(response.reason.error as Buffer).toString();
|
||||
}
|
||||
throw new NodeApiError(this.getNode(), response as JsonObject);
|
||||
throw new NodeApiError(this.getNode(), response as JsonObject, { itemIndex });
|
||||
} else {
|
||||
// Return the actual reason as error
|
||||
returnItems.push({
|
||||
|
||||
Reference in New Issue
Block a user