diff --git a/lib/ansible/module_utils/net_tools/nios/api.py b/lib/ansible/module_utils/net_tools/nios/api.py index 2035b6b020..7cc63b1b9c 100644 --- a/lib/ansible/module_utils/net_tools/nios/api.py +++ b/lib/ansible/module_utils/net_tools/nios/api.py @@ -158,7 +158,11 @@ class WapiBase(object): class WapiLookup(WapiBase): ''' Implements WapiBase for lookup plugins ''' - pass + def handle_exception(self, method_name, exc): + if ('text' in exc.response): + raise Exception(exc.response['text']) + else: + raise Exception(exc) class WapiInventory(WapiBase):