Exception: Kinu::HttpError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/kinu/errors.rb

Direct Known Subclasses

ClientError, ServerError

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ HttpError

Returns a new instance of HttpError.



13
14
15
16
17
# File 'lib/kinu/errors.rb', line 13

def initialize(response)
  @response = response
  @status = response.status
  super("status: #{status}, response: #{response.body}")
end

Instance Attribute Details

#responseObject (readonly)

Returns the value of attribute response.



11
12
13
# File 'lib/kinu/errors.rb', line 11

def response
  @response
end

#statusObject (readonly)

Returns the value of attribute status.



11
12
13
# File 'lib/kinu/errors.rb', line 11

def status
  @status
end