diff --git a/lib/fog/aws/elasticache.rb b/lib/fog/aws/elasticache.rb index 0d16fc3db..a8bd6b574 100644 --- a/lib/fog/aws/elasticache.rb +++ b/lib/fog/aws/elasticache.rb @@ -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' diff --git a/lib/fog/aws/requests/elasticache/describe_cache_clusters.rb b/lib/fog/aws/requests/elasticache/describe_cache_clusters.rb index f12ce2f89..8e7968c8e 100644 --- a/lib/fog/aws/requests/elasticache/describe_cache_clusters.rb +++ b/lib/fog/aws/requests/elasticache/describe_cache_clusters.rb @@ -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{CacheClusterNotFound} - raise Fog::AWS::Elasticache::NotFound - end end end