Merge pull request #13578 from WeiZhang555/errRet
return error when failed to read http response body Upstream-commit: 8d726709ad1479693c3c326fd69b432799b82192 Component: engine
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