fix: better error message when network gone

This commit is contained in:
decentral1se 2023-02-13 12:33:00 +01:00
parent eec6469ba1
commit ff58646cfc
Signed by untrusted user: decentral1se
GPG Key ID: 03789458B3D0C410

View File

@ -77,6 +77,8 @@ func Fatal(hostname string, err error) error {
return fmt.Errorf("connection timed out for %s", hostname)
} else if strings.Contains(out, "Permission denied") {
return fmt.Errorf("ssh auth: permission denied for %s", hostname)
} else if strings.Contains(out, "Network is unreachable") {
return fmt.Errorf("unable to connect to %s, network is unreachable?", hostname)
} else {
return err
}