Exception: Tr3llo::RemoteServer::RequestError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/3llo/remote_server.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ RequestError

Returns a new instance of RequestError.



12
13
14
15
# File 'lib/3llo/remote_server.rb', line 12

def initialize(response)
  @response = response
  super()
end

Instance Attribute Details

#responseObject (readonly)

Returns the value of attribute response.



10
11
12
# File 'lib/3llo/remote_server.rb', line 10

def response
  @response
end

Instance Method Details

#messageObject



17
18
19
20
21
# File 'lib/3llo/remote_server.rb', line 17

def message
  formatted_response = "status: " + response.code.inspect() + ", body: " + response.body.inspect()

  "Received unexpected response from remote server: " + formatted_response
end