Exception: Explicit::Request::InvalidResponseError
- Inherits:
-
RuntimeError
- Object
- RuntimeError
- Explicit::Request::InvalidResponseError
- Defined in:
- lib/explicit/request/invalid_response_error.rb
Instance Method Summary collapse
-
#initialize(response, error) ⇒ InvalidResponseError
constructor
A new instance of InvalidResponseError.
Constructor Details
#initialize(response, error) ⇒ InvalidResponseError
Returns a new instance of InvalidResponseError.
4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/explicit/request/invalid_response_error.rb', line 4 def initialize(response, error) super <<-TXT Got: HTTP #{response.status} #{JSON.pretty_generate(response.data)} This response doesn't match expected responses: #{error.presence || " ==> no response types found for status #{response.status}"} TXT end |