1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

[rackspace] updated ServiceException to catch JSON decoding exception and display a warning message.

This commit is contained in:
Kyle Rames 2013-04-16 14:57:34 -05:00
parent c1a744475e
commit 39bc371513

View file

@ -29,7 +29,9 @@ module Fog
begin
data = Fog::JSON.decode(error.response.body)
message = data.values.first ? data.values.first['message'] : data['message']
rescue Fog::JSON::LoadError => e
rescue => e
Fog::Logger.warning("Received exception '#{e}' while decoding>> #{error.response.body}")
message = error.response.body
data = error.response.body
end
end