code: func DefaultErrorParser(resp *http.Response) error {
  	resBody, err := ioutil.ReadAll(resp.Body)
  	if err != nil {
  		return err
  	}
  	defer resp.Body.Close()
  	rerr := new(Error)
  	err = json.Unmarshal(resBody, rerr)
  	if err != nil {
  		return fmt.Errorf("invalid response body: %s", string(resBody))
  	}
  	if rerr.Title == "" {
  		return fmt.Errorf("invalid response body: %s", string(resBody))
  	} else {
  		rerr.Status = resp.StatusCode
  		return rerr
  	}
  }
docs: // DefaultErrorParser attempts to parse the response body as a rest.Error. If
  // it cannot do so, return an error containing the entire response body.