code: func (c *Client) expect2XX(req *http.Request) (*http.Response, error) {
  	res, err := c.doReqGated(req)
  	if err == nil && (res.StatusCode < 200 || res.StatusCode > 299) {
  		buf := new(bytes.Buffer)
  		io.CopyN(buf, res.Body, 1<<20)
  		res.Body.Close()
  		return res, fmt.Errorf("client: got status code %d from URL %s; body %s", res.StatusCode, req.URL.String(), buf.String())
  	}
  	return res, err
  }
docs: // expect2XX will doReqGated and promote HTTP response codes outside of
  // the 200-299 range to a non-nil error containing the response body.