1
0
Fork 0
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:
Eric Wong 2013-05-23 08:25:06 +08:00
parent 8ed40ac5e4
commit 208fb6d20e
2 changed files with 2 additions and 3 deletions

View file

@ -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

View file

@ -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