File tree Expand file tree Collapse file tree 3 files changed +9
-0
lines changed Expand file tree Collapse file tree 3 files changed +9
-0
lines changed Original file line number Diff line number Diff line change 190
190
"error": {"type": "String", "example": "Network request failed: HTTP status 500"}
191
191
}
192
192
},
193
+ "errorReconnectingToServer": "Reconnecting to {url}…",
194
+ "@errorReconnectingToServer": {
195
+ "url": {"type": "String", "example": "http://example.com/"},
196
+ "description": "Message when reconnecting to the server."
197
+ },
193
198
"errorSharingFailed": "Sharing failed",
194
199
"@errorSharingFailed": {
195
200
"description": "Error message when sharing a message failed."
Original file line number Diff line number Diff line change @@ -794,6 +794,7 @@ class UpdateMachine {
794
794
switch (e) {
795
795
case ZulipApiException (code: 'BAD_EVENT_QUEUE_ID' ):
796
796
assert (debugLog ('Lost event queue for $store . Replacing…' ));
797
+ reportErrorToUser (localizations.errorReconnectingToServer (serverUrl));
797
798
await store._globalStore._reloadPerAccount (store.accountId);
798
799
dispose ();
799
800
debugLog ('… Event queue replaced.' );
Original file line number Diff line number Diff line change @@ -406,7 +406,10 @@ void main() {
406
406
});
407
407
updateMachine.debugAdvanceLoop ();
408
408
async .flushMicrotasks ();
409
+ check (debugLastReportedError).isNull ();
409
410
await Future <void >.delayed (Duration .zero);
411
+ check (debugTakeLastReportedError ()).isNotNull ()
412
+ .contains ('Reconnecting to ${eg .realmUrl .origin }…' );
410
413
check (store).isLoading.isTrue ();
411
414
412
415
// The global store has a new store.
You can’t perform that action at this time.
0 commit comments