Exception: Chain::JSONError
- Defined in:
- lib/chain/errors.rb
Overview
JSONError should be very rare, and will only arise if there is a bug in the Chain API, or if the upstream server is spoofing common Chain API response headers.
Instance Attribute Summary collapse
-
#request_id ⇒ Object
Returns the value of attribute request_id.
-
#response ⇒ Object
Returns the value of attribute response.
Instance Method Summary collapse
-
#initialize(request_id, response) ⇒ JSONError
constructor
A new instance of JSONError.
Constructor Details
#initialize(request_id, response) ⇒ JSONError
Returns a new instance of JSONError.
26 27 28 29 30 |
# File 'lib/chain/errors.rb', line 26 def initialize(request_id, response) super "Error decoding JSON response. Request-ID: #{request_id}" self.request_id = request_id self.response = response end |
Instance Attribute Details
#request_id ⇒ Object
Returns the value of attribute request_id.
23 24 25 |
# File 'lib/chain/errors.rb', line 23 def request_id @request_id end |
#response ⇒ Object
Returns the value of attribute response.
24 25 26 |
# File 'lib/chain/errors.rb', line 24 def response @response end |