Exception: Grendel::Client::HTTPException

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ HTTPException

Returns a new instance of HTTPException.



63
64
65
66
67
68
# File 'lib/grendel/client.rb', line 63

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

Instance Attribute Details

#responseObject (readonly)

Returns the value of attribute response.



61
62
63
# File 'lib/grendel/client.rb', line 61

def response
  @response
end