Exception: HSDeploy::Target::HostingStack::ApiError
- Inherits:
-
StandardError
- Object
- StandardError
- HSDeploy::Target::HostingStack::ApiError
- Defined in:
- lib/hsdeploy/target/hostingstack/api_client.rb
Instance Attribute Summary collapse
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Instance Method Summary collapse
-
#initialize(response) ⇒ ApiError
constructor
A new instance of ApiError.
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
#response ⇒ Object (readonly)
Returns the value of attribute response.
16 17 18 |
# File 'lib/hsdeploy/target/hostingstack/api_client.rb', line 16 def response @response end |