mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
[stormondemand] fix service exception handling
This commit is contained in:
parent
8ed40ac5e4
commit
208fb6d20e
2 changed files with 2 additions and 3 deletions
|
@ -196,7 +196,7 @@ module Fog
|
|||
unless response.body.empty?
|
||||
response.body = Fog::JSON.decode(response.body)
|
||||
end
|
||||
if response.body.has_key?('full_error')
|
||||
if response.body.has_key?('error_class')
|
||||
raise(Fog::Compute::StormOnDemand::Error, response.body.inspect)
|
||||
end
|
||||
response
|
||||
|
|
|
@ -89,7 +89,6 @@ module Fog
|
|||
:expects => 200,
|
||||
:method => :post
|
||||
}))
|
||||
puts response.body
|
||||
rescue Excon::Errors::HTTPStatusError => error
|
||||
raise case error
|
||||
when Excon::Errors::NotFound
|
||||
|
@ -101,7 +100,7 @@ module Fog
|
|||
unless response.body.empty?
|
||||
response.body = Fog::JSON.decode(response.body)
|
||||
end
|
||||
if response.body.has_key?('full_error')
|
||||
if response.body.has_key?('error_class')
|
||||
raise(Fog::Compute::StormOnDemand::Error, response.body.inspect)
|
||||
end
|
||||
response
|
||||
|
|
Loading…
Reference in a new issue