Skip to content

Commit c47d56e

Browse files
committed
Reoprt non-transient polling errors.
Signed-off-by: Zixuan James Li <[email protected]>
1 parent 2dd2123 commit c47d56e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/model/store.dart

+2-1
Original file line numberDiff line numberDiff line change
@@ -779,6 +779,7 @@ class UpdateMachine {
779779
switch (e) {
780780
case ZulipApiException(code: 'BAD_EVENT_QUEUE_ID'):
781781
assert(debugLog('Lost event queue for $store. Replacing…'));
782+
reportErrorToUserBriefly('Reconnecting to server.');
782783
await store._globalStore._reloadPerAccount(store.accountId);
783784
dispose();
784785
debugLog('… Event queue replaced.');
@@ -796,7 +797,7 @@ class UpdateMachine {
796797
default:
797798
assert(debugLog('Error polling event queue for $store: $e\n'
798799
'Backing off and retrying even though may be hopeless…'));
799-
// TODO tell user on non-transient error in polling
800+
reportErrorToUserBriefly('Error loading server data, will retry: $e');
800801
await backoffMachine.wait();
801802
assert(debugLog('… Backoff wait complete, retrying poll.'));
802803
continue;

0 commit comments

Comments
 (0)