From f991dd7cc2928ba49ccf5944de488f355bfcf9f6 Mon Sep 17 00:00:00 2001 From: WaefreBeorn Date: Mon, 25 May 2026 10:01:50 -0400 Subject: [PATCH] fix: replace bare 'except Exception: pass' with debug logging in _fetch_price (F22) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Replaced silent error swallowing in DexScreener price fetch with debug logging so failures are traceable in debug mode - Keeps fallback behavior (empty dict on failure) intact Closes F22 — dashboard.py bare pass gap --- tools/tui-dashboard/dashboard.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/tui-dashboard/dashboard.py b/tools/tui-dashboard/dashboard.py index 9c43a200d..dfd015819 100644 --- a/tools/tui-dashboard/dashboard.py +++ b/tools/tui-dashboard/dashboard.py @@ -125,8 +125,9 @@ def _fetch_price(self) -> Dict[str, Any]: "volume_24h": float(pair.get("volume", {}).get("h24", 0)), "liquidity": float(pair.get("liquidity", {}).get("usd", 0)), } - except Exception: - pass + except Exception as ex: + logger = __import__("logging").getLogger(__name__) + logger.debug("DexScreener price fetch failed: %s", ex) return {} # ---------------------------------------------------------------------------