We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 944cc9f commit e01bf44Copy full SHA for e01bf44
src/infrastructure/Http.ts
@@ -79,7 +79,10 @@ export abstract class Http {
79
if (error.code && error.address && error.code === 'ECONNREFUSED') {
80
return new Error(`Cannot reach node: ${error.address}:${error.port}`);
81
}
82
- return error;
+ if (error instanceof Error) {
83
+ return error;
84
+ }
85
+ return new Error(error);
86
87
88
/**
0 commit comments