Exception: Explicit::Request::InvalidResponseError

Inherits:
RuntimeError
  • Object
show all
Defined in:
lib/explicit/request/invalid_response_error.rb

Instance Method Summary collapse

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