code: func createResponseError(res *http.Response) error {
  	if res.Body == nil {
  		return &Error{Status: res.StatusCode}
  	}
  	data, err := ioutil.ReadAll(res.Body)
  	if err != nil {
  		return &Error{Status: res.StatusCode}
  	}
  	errReply := new(Error)
  	err = json.Unmarshal(data, errReply)
  	if err != nil {
  		return &Error{Status: res.StatusCode}
  	}
  	if errReply != nil {
  		if errReply.Status == 0 {
  			errReply.Status = res.StatusCode
  		}
  		return errReply
  	}
  	return &Error{Status: res.StatusCode}
  }
docs: // createResponseError creates an Error structure from the HTTP response,
  // its status code and the error information sent by Elasticsearch.