fix: Do not hide matrix exceptions in sync
This commit is contained in:
parent
03ade5583f
commit
0b1281358f
|
|
@ -1684,7 +1684,7 @@ class Client extends MatrixApi {
|
||||||
Logs().d('Running sync while init isn\'t done yet, dropping request');
|
Logs().d('Running sync while init isn\'t done yet, dropping request');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
SyncConnectionException? syncError;
|
Object? syncError;
|
||||||
await _checkSyncFilter();
|
await _checkSyncFilter();
|
||||||
timeout ??= const Duration(seconds: 30);
|
timeout ??= const Duration(seconds: 30);
|
||||||
final syncRequest = sync(
|
final syncRequest = sync(
|
||||||
|
|
@ -1693,7 +1693,11 @@ class Client extends MatrixApi {
|
||||||
timeout: timeout.inMilliseconds,
|
timeout: timeout.inMilliseconds,
|
||||||
setPresence: syncPresence,
|
setPresence: syncPresence,
|
||||||
).then((v) => Future<SyncUpdate?>.value(v)).catchError((e) {
|
).then((v) => Future<SyncUpdate?>.value(v)).catchError((e) {
|
||||||
syncError = SyncConnectionException(e);
|
if (e is MatrixException) {
|
||||||
|
syncError = e;
|
||||||
|
} else {
|
||||||
|
syncError = SyncConnectionException(e);
|
||||||
|
}
|
||||||
return null;
|
return null;
|
||||||
});
|
});
|
||||||
_currentSyncId = syncRequest.hashCode;
|
_currentSyncId = syncRequest.hashCode;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue