From d309af71056c502fcac80a0a807a0ca27f2ab175 Mon Sep 17 00:00:00 2001 From: Jesse S Date: Mon, 6 Nov 2023 13:53:05 -0800 Subject: [PATCH] fix: TOOLS-2717 `info namespace object` displays error when connecting to CE server (#231) --- lib/live_cluster/client/node.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/live_cluster/client/node.py b/lib/live_cluster/client/node.py index f1689efe..dabdc869 100644 --- a/lib/live_cluster/client/node.py +++ b/lib/live_cluster/client/node.py @@ -91,11 +91,11 @@ async def wrapper(*args, raise_exception=False, **kwargs): except (ASInfoNotAuthenticatedError, ASProtocolConnectionError) as e: args[0].alive = False exception = e - except (ASInfoError, ASProtocolError) as e: - exception = e - except Exception as e: + except OSError as e: args[0].alive = False exception = e + except (ASInfoError, ASProtocolError, Exception) as e: + exception = e if raise_exception: raise @@ -2454,6 +2454,10 @@ async def info_rack_ids(self): dict -- {ns1: rack_id, ns2: rack_id, ...} """ resp = await self._info("rack-ids") + + if "ERROR" in resp: + raise ASInfoResponseError("Failed to get rack ids for this node", resp) + rack_data = {} if not resp: