From 3645416c8d92f0e1720921f8b380edd7c4360c1d Mon Sep 17 00:00:00 2001 From: "Mark J. Horninger" Date: Sun, 10 Mar 2024 22:36:47 -0400 Subject: [PATCH] Forget about wrapping the error --- plugins/inventory/netbird.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/inventory/netbird.py b/plugins/inventory/netbird.py index 7ddbaf5..3ce2857 100644 --- a/plugins/inventory/netbird.py +++ b/plugins/inventory/netbird.py @@ -151,7 +151,7 @@ class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable): """Get the inventory from the Netbird API""" try: self.peers = self.client.ListPeers() - except: + except Exception: raise AnsibleError(f"Could not retrieve the Netbird inventory. Check the API Key and URL.") def _filter_by_config(self):