mirror of
https://github.com/clearlinux/docker.git
synced 2026-08-26 18:17:24 +00:00
return error when failed to read http response body
Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
This commit is contained in:
@@ -71,7 +71,7 @@ func (c *Client) callWithRetry(serviceMethod string, args interface{}, ret inter
|
||||
if resp.StatusCode != http.StatusOK {
|
||||
remoteErr, err := ioutil.ReadAll(resp.Body)
|
||||
if err != nil {
|
||||
return nil
|
||||
return fmt.Errorf("Plugin Error: %s", err)
|
||||
}
|
||||
return fmt.Errorf("Plugin Error: %s", remoteErr)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user