def ensure_success!(response)
      return if response.is_a? Net::HTTPSuccess

      message = "#{response.code} - #{response.message}"
      message += "\n#{response.body}" if response.body.present?

      raise Crapi::BadHttpResponseError, message
    end
def ensure_success!(response)
      return if response.is_a? Net::HTTPSuccess

      message = "#{response.code} - #{response.message}"
      message += "\n#{response.body}" if response.body.present?

      raise Crapi::BadHttpResponseError, message
    end
Verifies the given value is that of a successful HTTP response.


 @param response [Net::HTTPResponse]
   The response to evaluate as "successful" or not.


 @raise [Crapi::BadHttpResponseError]

 @return [nil]