Merge pull request #13578 from WeiZhang555/errRet
return error when failed to read http response body
This commit is contained in:
commit
e5d2c5eb34
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…
Reference in a new issue