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 <url>: <ExceptionType>: <msg>'
This commit is contained in:
parent
5c1753dfef
commit
75248741e7
7
main.py
7
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
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user