fix: handle err in get cluster

This commit is contained in:
Iain Cardnell 2019-12-18 10:44:03 +11:00
parent 496587c3bf
commit ca2d7b82bc

View File

@ -108,6 +108,9 @@ func (a ClustersAPI) Get(clusterID string) (models.ClusterInfo, error) {
clusterID,
}
resp, err := a.Client.performQuery(http.MethodGet, "/clusters/get", data, nil)
if err != nil {
return clusterInfo, err
}
err = json.Unmarshal(resp, &clusterInfo)
return clusterInfo, err