Skip to content

Commit 4aceed3

Browse files
committed
fix: recognize more errors as network issues
close #735
1 parent d8a4ffa commit 4aceed3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/gitManager/simpleGit.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -905,11 +905,15 @@ export class SimpleGit extends GitManager {
905905
if (error) {
906906
const networkFailure =
907907
error.message.contains("Could not resolve host") ||
908+
error.message.contains("Unable to resolve host") ||
908909
error.message.match(
909910
/ssh: connect to host .*? port .*?: Operation timed out/
910911
) ||
911912
error.message.match(
912913
/ssh: connect to host .*? port .*?: Network is unreachable/
914+
) ||
915+
error.message.match(
916+
/ssh: connect to host .*? port .*?: Undefined error: 0/
913917
);
914918
if (!networkFailure) {
915919
this.plugin.displayError(error.message);

0 commit comments

Comments
 (0)