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

[aws|elasticache] return nil on CacheClusterNotFound

This commit is contained in:
Benton Roberts 2011-09-08 13:04:25 -04:00 committed by geemus
parent 74d351998f
commit 49cc699d68
2 changed files with 4 additions and 1 deletions

View file

@ -21,7 +21,6 @@ module Fog
).body['CacheClusters'].first
)
rescue Fog::AWS::Elasticache::NotFound
nil
end
end

View file

@ -21,6 +21,10 @@ module Fog
'Action' => 'DescribeCacheClusters',
:parser => Fog::Parsers::AWS::Elasticache::DescribeCacheClusters.new
}.merge(options))
rescue Excon::Errors::NotFound => e
if e.response.body =~ %r{<Code>CacheClusterNotFound</Code>}
raise Fog::AWS::Elasticache::NotFound
end
end
end