From d295a97588898dc8d57321cb2d796900f6df3b45 Mon Sep 17 00:00:00 2001 From: "Mark J. Horninger" Date: Sun, 10 Mar 2024 22:35:31 -0400 Subject: [PATCH] Forget about wrapping the error --- plugins/inventory/netbird.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/inventory/netbird.py b/plugins/inventory/netbird.py index 79d3758..7ddbaf5 100644 --- a/plugins/inventory/netbird.py +++ b/plugins/inventory/netbird.py @@ -151,8 +151,8 @@ class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable): """Get the inventory from the Netbird API""" try: self.peers = self.client.ListPeers() - except Exception as e: - raise AnsibleError(f"Could not retrieve the Netbird inventory: {e.message}") + except: + raise AnsibleError(f"Could not retrieve the Netbird inventory. Check the API Key and URL.") def _filter_by_config(self): """Filter peers by user specified configuration."""