Exception: Grendel::Client::HTTPException

Inherits:
Exception
  • Object
show all
Defined in:
lib/grendel/client.rb

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ HTTPException

Returns a new instance of HTTPException.



56
57
58
59
60
# File 'lib/grendel/client.rb', line 56

def initialize(response)
  msg = "#{response.code} #{response.message}"
  msg << "\n#{response.body}" unless response.body.blank?
  super(msg)
end