mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08: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:
parent
157e8e0cc8
commit
c239eea1b9
|
@ -63,6 +63,8 @@ interface ExecutionBaseErrorOptions {
|
|||
export abstract class ExecutionBaseError extends Error {
|
||||
description: string | null | undefined;
|
||||
|
||||
cause: Error | JsonObject | undefined;
|
||||
|
||||
timestamp: number;
|
||||
|
||||
context: IDataObject = {};
|
||||
|
@ -78,6 +80,8 @@ export abstract class ExecutionBaseError extends Error {
|
|||
|
||||
if (cause instanceof ExecutionBaseError) {
|
||||
this.context = cause.context;
|
||||
} else if (cause && !(cause instanceof Error)) {
|
||||
this.cause = cause;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -179,7 +183,6 @@ abstract class NodeError extends ExecutionBaseError {
|
|||
value &&
|
||||
typeof value === 'object' &&
|
||||
!Array.isArray(value) &&
|
||||
typeof value.toJSON !== 'function' &&
|
||||
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument
|
||||
!!Object.keys(value).length
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue