Exception: HSDeploy::Target::HostingStack::ApiError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/hsdeploy/target/hostingstack/api_client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response) ⇒ ApiError

Returns a new instance of ApiError.



17
18
19
20
21
# File 'lib/hsdeploy/target/hostingstack/api_client.rb', line 17

def initialize(response)
  @response = response
  details = MultiJson.decode(response.body) rescue nil
  super("API failure: #{response.status} #{details}")
end

Instance Attribute Details

#responseObject (readonly)

Returns the value of attribute response.



16
17
18
# File 'lib/hsdeploy/target/hostingstack/api_client.rb', line 16

def response
  @response
end