Exception: Sequence::JSONError

Inherits:
BaseError
  • Object
show all
Defined in:
lib/sequence/errors.rb

Overview

JSONError should be very rare, and will only arise if there is a bug in the Sequence API, or if the upstream server is spoofing common Sequence API response headers.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(request_id, response) ⇒ JSONError

Returns a new instance of JSONError.



27
28
29
30
31
# File 'lib/sequence/errors.rb', line 27

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_idObject

Returns the value of attribute request_id.



24
25
26
# File 'lib/sequence/errors.rb', line 24

def request_id
  @request_id
end

#responseObject

Returns the value of attribute response.



25
26
27
# File 'lib/sequence/errors.rb', line 25

def response
  @response
end