From 75248741e75279f3caf7c216a5e86dfd045ee586 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 16 Jun 2026 21:32:36 +0000 Subject: [PATCH] fix: log exceptions on primary proxy target When the primary request to llama-server (10.0.4.11:8081) raises an exception (connection refused, timeout), it was silently swallowed by the catch-all except block, making it look like a sidecar/switch failure when it was actually a network-level error. Now prints: 'PROXY EXCEPTION on primary : : ' --- main.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index 3c412e3..60c3ad8 100644 --- a/main.py +++ b/main.py @@ -562,8 +562,11 @@ async def proxy( primary_result = None try: primary_result = await execute(target_url) - except Exception: - pass # Falls through to fallback chain + except Exception as e: + print( + f"PROXY EXCEPTION on primary {target_url}: {type(e).__name__}: {e}", + flush=True, + ) # Falls through to fallback chain if primary_result is not None: return primary_result