Bug | Error message being swallowed in azure_rm_common.py (#33298)

This commit is contained in:
ZhijunZhao 2017-11-28 11:03:41 +08:00 committed by ansibot
commit a18b7d9b01
8 changed files with 11 additions and 28 deletions

View file

@ -415,8 +415,8 @@ class AzureRMModuleBase(object):
'''
try:
return self.rm_client.resource_groups.get(resource_group)
except CloudError:
self.fail("Parameter error: resource group {0} not found".format(resource_group))
except CloudError as cloud_error:
self.fail("Error retrieving resource group {0} - {1}".format(resource_group, cloud_error.message))
except Exception as exc:
self.fail("Error retrieving resource group {0} - {1}".format(resource_group, str(exc)))