Exception: Faraday::UnexpectedResponse
- Inherits:
-
RuntimeError
- Object
- RuntimeError
- Faraday::UnexpectedResponse
- Defined in:
- lib/unexpected_response.rb
Instance Attribute Summary collapse
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
-
#initialize(response) ⇒ UnexpectedResponse
constructor
A new instance of UnexpectedResponse.
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
#response ⇒ Object (readonly)
Returns the value of attribute response.
5 6 7 |
# File 'lib/unexpected_response.rb', line 5 def response @response end |