mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
fix(HTTP Request Node): Show error cause in the output (#4538)
fix (HTTP Request node): show error cause in the output This broke in these two PRs https://github.com/n8n-io/n8n/pull/4505/ https://github.com/n8n-io/n8n/pull/4431/
This commit is contained in:
committed by
GitHub
parent
157e8e0cc8
commit
c239eea1b9
@@ -63,6 +63,8 @@ interface ExecutionBaseErrorOptions {
|
|||||||
export abstract class ExecutionBaseError extends Error {
|
export abstract class ExecutionBaseError extends Error {
|
||||||
description: string | null | undefined;
|
description: string | null | undefined;
|
||||||
|
|
||||||
|
cause: Error | JsonObject | undefined;
|
||||||
|
|
||||||
timestamp: number;
|
timestamp: number;
|
||||||
|
|
||||||
context: IDataObject = {};
|
context: IDataObject = {};
|
||||||
@@ -78,6 +80,8 @@ export abstract class ExecutionBaseError extends Error {
|
|||||||
|
|
||||||
if (cause instanceof ExecutionBaseError) {
|
if (cause instanceof ExecutionBaseError) {
|
||||||
this.context = cause.context;
|
this.context = cause.context;
|
||||||
|
} else if (cause && !(cause instanceof Error)) {
|
||||||
|
this.cause = cause;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -179,7 +183,6 @@ abstract class NodeError extends ExecutionBaseError {
|
|||||||
value &&
|
value &&
|
||||||
typeof value === 'object' &&
|
typeof value === 'object' &&
|
||||||
!Array.isArray(value) &&
|
!Array.isArray(value) &&
|
||||||
typeof value.toJSON !== 'function' &&
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
||||||
!!Object.keys(value).length
|
!!Object.keys(value).length
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user