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:
parent
74d351998f
commit
49cc699d68
2 changed files with 4 additions and 1 deletions
|
@ -21,7 +21,6 @@ module Fog
|
||||||
).body['CacheClusters'].first
|
).body['CacheClusters'].first
|
||||||
)
|
)
|
||||||
rescue Fog::AWS::Elasticache::NotFound
|
rescue Fog::AWS::Elasticache::NotFound
|
||||||
nil
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,10 @@ module Fog
|
||||||
'Action' => 'DescribeCacheClusters',
|
'Action' => 'DescribeCacheClusters',
|
||||||
:parser => Fog::Parsers::AWS::Elasticache::DescribeCacheClusters.new
|
:parser => Fog::Parsers::AWS::Elasticache::DescribeCacheClusters.new
|
||||||
}.merge(options))
|
}.merge(options))
|
||||||
|
rescue Excon::Errors::NotFound => e
|
||||||
|
if e.response.body =~ %r{<Code>CacheClusterNotFound</Code>}
|
||||||
|
raise Fog::AWS::Elasticache::NotFound
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue