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

[aws|elasticache] move ClusterNotFound rescue code into Elasticache service definition

This commit is contained in:
Benton Roberts 2011-09-08 14:18:27 -04:00 committed by geemus
parent 98e60cee19
commit 36d405f2a9
2 changed files with 2 additions and 4 deletions

View file

@ -104,6 +104,8 @@ module Fog
case match[1]
when 'CacheSecurityGroupNotFound'
raise Fog::AWS::Elasticache::NotFound
when 'CacheClusterNotFound'
raise Fog::AWS::Elasticache::NotFound
when 'CacheSecurityGroupAlreadyExists'
raise Fog::AWS::Elasticache::IdentifierTaken
when 'InvalidParameterValue'

View file

@ -21,10 +21,6 @@ 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