mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
[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
This commit is contained in:
parent
4d1fc17bc6
commit
84b0fb4d2d
1 changed files with 1 additions and 1 deletions
|
@ -140,7 +140,7 @@ module Fog
|
||||||
rescue Excon::Errors::HTTPStatusError => error
|
rescue Excon::Errors::HTTPStatusError => error
|
||||||
if match = error.message.match(/<Code>(.*)<\/Code>[\s\\\w]+<Message>(.*)<\/Message>/m)
|
if match = error.message.match(/<Code>(.*)<\/Code>[\s\\\w]+<Message>(.*)<\/Message>/m)
|
||||||
case match[1].split('.').last
|
case match[1].split('.').last
|
||||||
when 'DBInstanceNotFound', 'DBParameterGroupNotFound', 'DBSnapshotNotFound'
|
when 'DBInstanceNotFound', 'DBParameterGroupNotFound', 'DBSnapshotNotFound', 'DBSecurityGroupNotFound'
|
||||||
raise Fog::AWS::RDS::NotFound.slurp(error, match[2])
|
raise Fog::AWS::RDS::NotFound.slurp(error, match[2])
|
||||||
when 'DBParameterGroupAlreadyExists'
|
when 'DBParameterGroupAlreadyExists'
|
||||||
raise Fog::AWS::RDS::IdentifierTaken.slurp(error, match[2])
|
raise Fog::AWS::RDS::IdentifierTaken.slurp(error, match[2])
|
||||||
|
|
Loading…
Reference in a new issue