From d9b3d66d53cb2a734dd94fd2e0c8b071fe5aba0e Mon Sep 17 00:00:00 2001 From: HarvsG <11440490+HarvsG@users.noreply.github.com> Date: Mon, 20 Oct 2025 20:22:43 +0100 Subject: [PATCH] Improve error handling in authentication Raise HoleConnectionError with original exception context. As sometimes the error message is an empty string --- hole/v6.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hole/v6.py b/hole/v6.py index eacc4a1..a9d84ed 100644 --- a/hole/v6.py +++ b/hole/v6.py @@ -136,7 +136,7 @@ async def authenticate(self): except (asyncio.TimeoutError, aiohttp.ClientError, socket.gaierror) as err: raise exceptions.HoleConnectionError( f"Cannot authenticate with Pi-hole: {err}" - ) + ) from err async def logout(self): """Logout and cleanup the current session."""