diff --git a/main.py b/main.py index 8ff3cf8..c4aef8b 100644 --- a/main.py +++ b/main.py @@ -7,6 +7,7 @@ from nio import ( AsyncClientConfig, RoomMessageText, InviteEvent, + SyncError, ) from callbacks import Callbacks from config import Config @@ -52,6 +53,11 @@ async def main(): # Sync with the server sync_response = await client.sync(timeout=30000, full_state=True, since=token) + # Check if the sync had an error + if type(sync_response) == SyncError: + logger.warning("Error in client sync: %s", sync_response.message) + continue + # Save the latest sync token token = sync_response.next_batch if token: