Class: Fieldhand::ResponseError
- Inherits:
-
NetworkError
- Object
- Fieldhand::ResponseError
- Defined in:
- lib/fieldhand/network_errors.rb
Overview
Custom exception to handle unexpected HTTP responses
Instance Attribute Summary collapse
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
-
#initialize(response) ⇒ ResponseError
constructor
A new instance of ResponseError.
Constructor Details
#initialize(response) ⇒ ResponseError
Returns a new instance of ResponseError.
10 11 12 13 14 |
# File 'lib/fieldhand/network_errors.rb', line 10 def initialize(response) super("Invalid response: #{response.code} #{response.msg}") @response = response end |
Instance Attribute Details
#response ⇒ Object (readonly)
Returns the value of attribute response.
8 9 10 |
# File 'lib/fieldhand/network_errors.rb', line 8 def response @response end |