Exception: OutlineVpnApi::ResponseError

Inherits:
Error
  • Object
show all
Defined in:
lib/outline_vpn_api/errors.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(code, body, message = nil) ⇒ ResponseError

Returns a new instance of ResponseError.



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

def initialize(code, body, message = nil)
  @code = code
  @body = body
  super(message || "Outline API returned HTTP #{code}")
end

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



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

def body
  @body
end

#codeObject (readonly)

Returns the value of attribute code.



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

def code
  @code
end