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:
parent
c1c1ffb63a
commit
ac1299c472
3 changed files with 3 additions and 3 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue