Bugfix: Show reason for sync failure on UI

This commit is contained in:
Neeraj Gupta 2022-01-10 21:24:01 +05:30
parent e2573b1a5f
commit d5412b8645
No known key found for this signature in database
GPG key ID: 3C5A1684DC1729E1

View file

@ -104,7 +104,12 @@ class RemoteSyncService {
_logger.severe("Error executing remote sync ", e, s);
_existingSync.complete();
_existingSync = null;
if (e is UnauthorizedError) {
// rethrow whitelisted error so that UI status can be updated correctly.
if (e is UnauthorizedError ||
e is NoActiveSubscriptionError ||
e is WiFiUnavailableError ||
e is StorageLimitExceededError ||
e is SyncStopRequestedError) {
rethrow;
}
}