Skip to content

Commit

Permalink
fix (HTTP Request node): show error cause in the output
Browse files Browse the repository at this point in the history
This broke in these two PRs

#4505
#4431
  • Loading branch information
netroy committed Nov 7, 2022
1 parent 9ee292c commit 0853e8b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/workflow/src/NodeErrors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ interface ExecutionBaseErrorOptions {
export abstract class ExecutionBaseError extends Error {
description: string | null | undefined;

cause: Error | JsonObject | undefined;

timestamp: number;

context: IDataObject = {};
Expand All @@ -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;
}
}
}
Expand Down Expand Up @@ -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
);
Expand Down

0 comments on commit 0853e8b

Please sign in to comment.