code: func CheckResponse(r *http.Response) error {
  	if c := r.StatusCode; 200 <= c && c <= 299 {
  		return nil
  	}
  
  	// Some calls require an authentification
  	// In such cases errors like:
  	// 		API call to https://review.typo3.org/accounts/self failed: 403 Forbidden
  	// will be thrown.
  
  	err := fmt.Errorf("API call to %s failed: %s", r.Request.URL.String(), r.Status)
  	return err
  }
docs: // CheckResponse checks the API response for errors, and returns them if present.
  // A response is considered an error if it has a status code outside the 200 range.
  // API error responses are expected to have no response body.
  //
  // Gerrit API docs: https://gerrit-review.googlesource.com/Documentation/rest-api.html#response-codes