class RestClient::Exception

probably an HTML error page) is e.response.
For example, the entire result body (which is
response via e.response.
You can get the status code by e.http_code, or see anything about the
catch any exception that your request might raise
This is the base RestClient exception class. Rescue it if you want to

def http_body

def http_body
  @response.body if @response
end

def http_code

def http_code
  # return integer for compatibility
  @response.code.to_i if @response
end

def initialize response = nil

def initialize response = nil
  @response = response
  # compatibility: this make the exception behave like a Net::HTTPResponse
  response.extend ResponseForException if response
end

def inspect

def inspect
  "#{self.class} : #{http_code} #{message}"
end