class T2Server::UnexpectedServerResponse

Raised when there is an unexpected response from the server. This does not necessarily indicate a problem with the server.

Public Class Methods

new(response) click to toggle source

Create a new UnexpectedServerResponse with the specified unexpected response. The response to be passed in is that which was returned by a call to Net::HTTP#request.

# File lib/t2-server/exceptions.rb, line 89
def initialize(response)
  body = response.body ? "\n#{response.body}" : ""
  super "Unexpected server response: #{response.code}\n#{body}"
end