Skip to content

Commit

Permalink
fix(HTTP Request Node): Do not create circular references in HTTP req…
Browse files Browse the repository at this point in the history
…uest 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.
  • Loading branch information
netroy authored Dec 15, 2023
1 parent 67bd8ad commit 5b7ea16
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -993,6 +993,7 @@ export class HttpRequestV1 implements INodeType {
}

response = response.value;
delete response.request;

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

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

response = response.value;
delete response.request;

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5b7ea16

Please sign in to comment.