Exception: Singly::ApiError

Inherits:
Error
  • Object
show all
Defined in:
lib/singly/error.rb

Direct Known Subclasses

TimeoutError

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Error

y_u_no?

Constructor Details

#initialize(response, msg = nil) ⇒ ApiError

Returns a new instance of ApiError.



16
17
18
19
# File 'lib/singly/error.rb', line 16

def initialize(response, msg=nil)
  @response = response
  super(msg || "HTTP #{response.code} #{response.body}")
end

Instance Attribute Details

#responseObject (readonly)

Returns the value of attribute response.



15
16
17
# File 'lib/singly/error.rb', line 15

def response
  @response
end