Handle refresh token exception - #449
Conversation
🤖 Augment PR SummarySummary: Makes realtime reconnects tolerate failures from user-supplied access-token refresh callbacks. Changes:
Technical Notes: Successful refresh behavior, including synchronizing a changed token with the data API, remains unchanged. 🤖 Was this summary useful? React with 👍 or 👎 |
| access_token = await self._refresh_access_token() | ||
| try: | ||
| access_token = await self._refresh_access_token() | ||
| except Exception: |
There was a problem hiding this comment.
TibberRT is also an exported public class and accepts refresh_access_token directly, but its reconnect() still awaits that callback unguarded at tibber/realtime.py:154. Consequently, direct TibberRT users still have reconnect abort when their externally defined callback raises, despite the behavior this change intends to provide.
Severity: medium
🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.
There was a problem hiding this comment.
I don't think TibberRT is expected to be called separately, but in any case I think that's a separate problem.
The callback is defined outside of this library so we need to handle exceptions when calling it.