From 84b0fb4d2d4cf0a5e97ea1f37283a4f1d95ae8ad Mon Sep 17 00:00:00 2001 From: Aaron Suggs Date: Mon, 11 Apr 2011 16:02:59 -0400 Subject: [PATCH] [aws|rds] Fix exception for missing DB security groups RDS#describe_db_instances('no-such-group') raises Fog::AWS::RDS::NotFound instead of Excon::Errors::NotFound --- lib/fog/aws/rds.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/fog/aws/rds.rb b/lib/fog/aws/rds.rb index 91e1be9a2..ee2e10be9 100644 --- a/lib/fog/aws/rds.rb +++ b/lib/fog/aws/rds.rb @@ -140,7 +140,7 @@ module Fog rescue Excon::Errors::HTTPStatusError => error if match = error.message.match(/(.*)<\/Code>[\s\\\w]+(.*)<\/Message>/m) case match[1].split('.').last - when 'DBInstanceNotFound', 'DBParameterGroupNotFound', 'DBSnapshotNotFound' + when 'DBInstanceNotFound', 'DBParameterGroupNotFound', 'DBSnapshotNotFound', 'DBSecurityGroupNotFound' raise Fog::AWS::RDS::NotFound.slurp(error, match[2]) when 'DBParameterGroupAlreadyExists' raise Fog::AWS::RDS::IdentifierTaken.slurp(error, match[2])