mirror of
https://github.com/n8n-io/n8n.git
synced 2025-01-11 12:57:29 -08:00
🐛 Fix circular references removal (#1901)
Circular references removed only for the request library error.
This commit is contained in:
parent
0b65459f9f
commit
e45d173c45
|
@ -52,7 +52,6 @@ abstract class NodeError extends Error {
|
|||
|
||||
constructor(node: INode, error: Error | JsonObject) {
|
||||
super();
|
||||
this.removeCircularRefs(error as JsonObject);
|
||||
this.name = this.constructor.name;
|
||||
this.cause = error;
|
||||
this.node = node;
|
||||
|
@ -215,6 +214,9 @@ export class NodeApiError extends NodeError {
|
|||
{ message, description, httpCode, parseXml }: { message?: string, description?: string, httpCode?: string, parseXml?: boolean } = {},
|
||||
) {
|
||||
super(node, error);
|
||||
if (error.error) { // only for request library error
|
||||
this.removeCircularRefs(error.error as JsonObject);
|
||||
}
|
||||
if (message) {
|
||||
this.message = message;
|
||||
this.description = description;
|
||||
|
|
Loading…
Reference in a new issue