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:
Brian Krabach
2026-04-08 19:32:20 -07:00
parent f5ae0df9f5
commit 8fcb25adee
+3 -2
View File
@@ -165,11 +165,12 @@ async def _run_poll_cycle() -> None:
bell_clear_url,
headers={"Authorization": f"Bearer {remote_key}"} if remote_key else {},
)
except Exception:
except Exception as exc:
_log.warning(
"federation bell clear failed for %s: %s",
"federation bell clear failed for %s at %s: %s",
viewing_session,
bell_clear_url,
exc,
)
# 10. Prune devices that haven't sent a heartbeat recently