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

[aws|dns] fix error handling for getting unknown keys

This commit is contained in:
geemus 2011-05-10 17:11:34 -07:00
parent c1c1ffb63a
commit ac1299c472
3 changed files with 3 additions and 3 deletions

View file

@ -33,7 +33,7 @@ module Fog
def get(record_id)
data = connection.get_change(record_id).body
new(data)
rescue Excon::Errors::BadRequest
rescue Excon::Errors::Forbidden
nil
end

View file

@ -22,7 +22,7 @@ module Fog
def get(zone_id)
data = connection.get_hosted_zone(zone_id).body
new(data)
rescue Excon::Errors::BadRequest
rescue Excon::Errors::Forbidden
nil
end

View file

@ -264,7 +264,7 @@ Shindo.tests('AWS::DNS | DNS requests', ['aws', 'dns']) do
response = AWS[:dns].create_hosted_zone('invalid-domain')
end
tests('get hosted zone using invalid ID').raises(Excon::Errors::BadRequest) do
tests('get hosted zone using invalid ID').raises(Excon::Errors::Forbidden) do
pending if Fog.mocking?
zone_id = 'dummy-id'
response = AWS[:dns].get_hosted_zone(zone_id)