Exception: ScaleChain::APIException

Inherits:
StandardError
  • Object
show all
Defined in:
lib/scalechain/api_exception.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(reason, response_code, response_body) ⇒ APIException

Returns a new instance of APIException.

Parameters:

  • the (Object)

    HTTP unprased response from the API request



16
17
18
19
20
# File 'lib/scalechain/api_exception.rb', line 16

def initialize(reason, response_code, response_body)
    super(reason)
    @response_code = response_code
		@response_body = response_body
end

Instance Attribute Details

#response_bodyObject (readonly)

value store



10
11
12
# File 'lib/scalechain/api_exception.rb', line 10

def response_body
  @response_body
end

#response_codeObject (readonly)

value store



7
8
9
# File 'lib/scalechain/api_exception.rb', line 7

def response_code
  @response_code
end