code: func GetWithStatusError(address string) (resp *http.Response, err error) {
  	if resp, err = http.Get(address); err != nil {
  		if uerr, ok := err.(*url.Error); ok {
  			if derr, ok := uerr.Err.(*net.DNSError); ok && !derr.IsTimeout {
  				return nil, errdefs.NotFound(err)
  			}
  		}
  		return nil, errdefs.System(err)
  	}
  	if resp.StatusCode < 400 {
  		return resp, nil
  	}
  	msg := fmt.Sprintf("failed to GET %s with status %s", address, resp.Status)
  	body, err := ioutil.ReadAll(resp.Body)
  	resp.Body.Close()
  	if err != nil {
  		return nil, errdefs.System(errors.New(msg + ": error reading body"))
  	}
  
  	msg += ": " + string(bytes.TrimSpace(body))
  	switch resp.StatusCode {
  	case http.StatusNotFound:
  		return nil, errdefs.NotFound(errors.New(msg))
  	case http.StatusBadRequest:
  		return nil, errdefs.InvalidParameter(errors.New(msg))
  	case http.StatusUnauthorized:
  		return nil, errdefs.Unauthorized(errors.New(msg))
  	case http.StatusForbidden:
  		return nil, errdefs.Forbidden(errors.New(msg))
  	}
  	return nil, errdefs.Unknown(errors.New(msg))
  }
docs: // GetWithStatusError does an http.Get() and returns an error if the
  // status code is 4xx or 5xx.