Exception: Faraday::UnexpectedResponse

Inherits:
RuntimeError
  • Object
show all
Defined in:
lib/unexpected_response.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ UnexpectedResponse

Returns a new instance of UnexpectedResponse.



7
8
9
10
# File 'lib/unexpected_response.rb', line 7

def initialize(response)
  @response = response
  super "Unexpected response (#{response.status}) from #{response.env[:url].host}#{response.env[:url].path}"
end

Instance Attribute Details

#responseObject (readonly)

Returns the value of attribute response.



5
6
7
# File 'lib/unexpected_response.rb', line 5

def response
  @response
end