fix: capture exception in federation bell clear warning log
Captures the exception as 'exc' in the except clause and includes it as the third argument to the warning log message. This ensures that the failure reason is observable in logs, improving diagnostics for federation heartbeat failures. Generated with Amplifier Co-Authored-By: Amplifier <240397093+microsoft-amplifier@users.noreply.github.com>
This commit is contained in:
+3
-2
@@ -165,11 +165,12 @@ async def _run_poll_cycle() -> None:
|
|||||||
bell_clear_url,
|
bell_clear_url,
|
||||||
headers={"Authorization": f"Bearer {remote_key}"} if remote_key else {},
|
headers={"Authorization": f"Bearer {remote_key}"} if remote_key else {},
|
||||||
)
|
)
|
||||||
except Exception:
|
except Exception as exc:
|
||||||
_log.warning(
|
_log.warning(
|
||||||
"federation bell clear failed for %s: %s",
|
"federation bell clear failed for %s at %s: %s",
|
||||||
viewing_session,
|
viewing_session,
|
||||||
bell_clear_url,
|
bell_clear_url,
|
||||||
|
exc,
|
||||||
)
|
)
|
||||||
|
|
||||||
# 10. Prune devices that haven't sent a heartbeat recently
|
# 10. Prune devices that haven't sent a heartbeat recently
|
||||||
|
|||||||
Reference in New Issue
Block a user