kubectl: kubectl version better error message

Kubernetes-commit: 047ef3f6b6fa4a2345640a608211ed3e177587e6
This commit is contained in:
Ahmad Nurus S
2019-01-10 01:21:24 +07:00
committed by Kubernetes Publisher
parent 68a55fba7c
commit 959fd3518b

View File

@@ -381,7 +381,7 @@ func (d *DiscoveryClient) ServerVersion() (*version.Info, error) {
var info version.Info
err = json.Unmarshal(body, &info)
if err != nil {
return nil, fmt.Errorf("got '%s': %v", string(body), err)
return nil, fmt.Errorf("unable to parse the server version: %v", err)
}
return &info, nil
}