diff --git a/lib/ansible/module_utils/redfish_utils.py b/lib/ansible/module_utils/redfish_utils.py index 470bb3d42b9..a6e5429a348 100644 --- a/lib/ansible/module_utils/redfish_utils.py +++ b/lib/ansible/module_utils/redfish_utils.py @@ -38,7 +38,7 @@ class RedfishUtils(object): return {'ret': False, 'msg': "URL Error: %s" % e.reason} # Almost all errors should be caught above, but just in case except: - return {'ret': False, 'msg': "Unknown error"} + return {'ret': False, 'msg': "Unknown error %s" % str(e)} return {'ret': True, 'data': data} def post_request(self, uri, pyld, hdrs): @@ -55,7 +55,7 @@ class RedfishUtils(object): return {'ret': False, 'msg': "URL Error: %s" % e.reason} # Almost all errors should be caught above, but just in case except: - return {'ret': False, 'msg': "Unknown error"} + return {'ret': False, 'msg': "Unknown error %s" % str(e)} return {'ret': True, 'resp': resp} def patch_request(self, uri, pyld, hdrs): @@ -72,7 +72,7 @@ class RedfishUtils(object): return {'ret': False, 'msg': "URL Error: %s" % e.reason} # Almost all errors should be caught above, but just in case except: - return {'ret': False, 'msg': "Unknown error"} + return {'ret': False, 'msg': "Unknown error %s" % str(e)} return {'ret': True, 'resp': resp} def delete_request(self, uri, pyld, hdrs): @@ -89,7 +89,7 @@ class RedfishUtils(object): return {'ret': False, 'msg': "URL Error: %s" % e.reason} # Almost all errors should be caught above, but just in case except: - return {'ret': False, 'msg': "Unknown error"} + return {'ret': False, 'msg': "Unknown error %s" % str(e)} return {'ret': True, 'resp': resp} def _init_session(self):