Skip to content

Commit e8a957a

Browse files
committed
Fixed #448
- Added custom error message for ECONNREFUSED
1 parent 58d5d64 commit e8a957a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/infrastructure/Http.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@ export abstract class Http {
6969
};
7070
return new Error(JSON.stringify(formattedError));
7171
}
72+
if (error.code && error.address && error.code === 'ECONNREFUSED') {
73+
return new Error(`Cannot reach node: ${error.address}:${error.port}`);
74+
}
7275
return new Error(error);
7376
}
7477
}

0 commit comments

Comments
 (0)