Skip to content

Commit

Permalink
fix(HTTP Request Node): Delete response.request only when it's a va…
Browse files Browse the repository at this point in the history
…lid circular references (#8293)
  • Loading branch information
netroy authored Jan 10, 2024
1 parent 8c7f399 commit 05c43fa
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -994,7 +994,7 @@ export class HttpRequestV1 implements INodeType {
}

response = response.value;
delete response.request;
if (response?.request?.constructor.name === 'ClientRequest') delete response.request;

const options = this.getNodeParameter('options', itemIndex, {});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1047,7 +1047,7 @@ export class HttpRequestV2 implements INodeType {
}

response = response.value;
delete response.request;
if (response?.request?.constructor.name === 'ClientRequest') delete response.request;

const options = this.getNodeParameter('options', itemIndex, {});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1786,7 +1786,8 @@ export class HttpRequestV3 implements INodeType {

// eslint-disable-next-line prefer-const
for (let [index, response] of Object.entries(responses)) {
delete response.request;
if (response?.request?.constructor.name === 'ClientRequest') 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
Expand Down

0 comments on commit 05c43fa

Please sign in to comment.