From 4c5164ef36ac5633a639293e7e9cc763482915f9 Mon Sep 17 00:00:00 2001 From: "Mark J. Horninger" Date: Sun, 10 Mar 2024 22:23:14 -0400 Subject: [PATCH] Fixed exception handling a little more --- 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 430119f..4da2581 100644 --- a/plugins/inventory/netbird.py +++ b/plugins/inventory/netbird.py @@ -152,7 +152,7 @@ class InventoryModule(BaseInventoryPlugin, Constructable, Cacheable): try: self.peers = self.client.ListPeers() except ConnectionRefusedError|ConnectionError as e: - raise AnsibleError from e + raise AnsibleError(f"Could not retrieve the Netbird inventory: {e.message}") def _filter_by_config(self): """Filter peers by user specified configuration."""