mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
return error when failed to read http response body
Signed-off-by: Zhang Wei <zhangwei555@huawei.com>
This commit is contained in:
parent
7f6a7973cd
commit
de225b5d13
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue