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:
parent
c1a744475e
commit
39bc371513
1 changed files with 3 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue