From 5b7ea16d9a20880c72779b02620e99ebe9f3617a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E0=A4=95=E0=A4=BE=E0=A4=B0=E0=A4=A4=E0=A5=8B=E0=A4=AB?= =?UTF-8?q?=E0=A5=8D=E0=A4=AB=E0=A5=87=E0=A4=B2=E0=A4=B8=E0=A5=8D=E0=A4=95?= =?UTF-8?q?=E0=A5=8D=E0=A4=B0=E0=A4=BF=E0=A4=AA=E0=A5=8D=E0=A4=9F=E2=84=A2?= Date: Fri, 15 Dec 2023 16:40:39 +0100 Subject: [PATCH] fix(HTTP Request Node): Do not create circular references in HTTP request node output (#8030) ## Summary Remove unused `response.request` circular reference in http response objects ## Related tickets [PAY-1119](https://linear.app/n8n/issue/PAY-1119) ## Review / Merge checklist - [x] PR title and summary are descriptive. --- packages/nodes-base/nodes/HttpRequest/V1/HttpRequestV1.node.ts | 1 + packages/nodes-base/nodes/HttpRequest/V2/HttpRequestV2.node.ts | 1 + packages/nodes-base/nodes/HttpRequest/V3/HttpRequestV3.node.ts | 1 + 3 files changed, 3 insertions(+) diff --git a/packages/nodes-base/nodes/HttpRequest/V1/HttpRequestV1.node.ts b/packages/nodes-base/nodes/HttpRequest/V1/HttpRequestV1.node.ts index f1db2e33ae850..57b7d5278a433 100644 --- a/packages/nodes-base/nodes/HttpRequest/V1/HttpRequestV1.node.ts +++ b/packages/nodes-base/nodes/HttpRequest/V1/HttpRequestV1.node.ts @@ -993,6 +993,7 @@ export class HttpRequestV1 implements INodeType { } response = response.value; + delete response.request; const options = this.getNodeParameter('options', itemIndex, {}); diff --git a/packages/nodes-base/nodes/HttpRequest/V2/HttpRequestV2.node.ts b/packages/nodes-base/nodes/HttpRequest/V2/HttpRequestV2.node.ts index c2f5a7553cc8a..4ccdae8df4b60 100644 --- a/packages/nodes-base/nodes/HttpRequest/V2/HttpRequestV2.node.ts +++ b/packages/nodes-base/nodes/HttpRequest/V2/HttpRequestV2.node.ts @@ -1046,6 +1046,7 @@ export class HttpRequestV2 implements INodeType { } response = response.value; + delete response.request; const options = this.getNodeParameter('options', itemIndex, {}); diff --git a/packages/nodes-base/nodes/HttpRequest/V3/HttpRequestV3.node.ts b/packages/nodes-base/nodes/HttpRequest/V3/HttpRequestV3.node.ts index e0e20b3477231..d6247f9c81406 100644 --- a/packages/nodes-base/nodes/HttpRequest/V3/HttpRequestV3.node.ts +++ b/packages/nodes-base/nodes/HttpRequest/V3/HttpRequestV3.node.ts @@ -1767,6 +1767,7 @@ export class HttpRequestV3 implements INodeType { // eslint-disable-next-line prefer-const for (let [index, response] of Object.entries(responses)) { + delete response.request; if (this.getMode() === 'manual' && index === '0') { // For manual executions save the first response in the context // so that we can use it in the frontend and so make it easier for