code: func checkResp(resp *http.Response, err error) (*http.Response, error) {
  	// If the err is already there, there was an error higher up the chain, so
  	// just return that.
  	if err != nil {
  		return resp, err
  	}
  
  	switch resp.StatusCode {
  	case 200, 201, 202, 204, 205, 206:
  		return resp, nil
  	default:
  		return resp, NewHTTPError(resp)
  	}
  }
docs: // checkResp wraps an HTTP request from the default client and verifies that the
  // request was successful. A non-200 request returns an error formatted to
  // included any validation problems or otherwise.