Jelajahi Sumber

Add a silent exception for upload errors

Vishnu Mohandas 4 tahun lalu
induk
melakukan
114511489d
2 mengubah file dengan 4 tambahan dan 0 penghapusan
  1. 2 0
      lib/core/errors.dart
  2. 2 0
      lib/services/sync_service.dart

+ 2 - 0
lib/core/errors.dart

@@ -7,3 +7,5 @@ class SyncStopRequestedError extends Error {}
 class NoActiveSubscriptionError extends Error {}
 
 class StorageLimitExceededError extends Error {}
+
+class SilentlyCancelUploadsError extends Error {}

+ 2 - 0
lib/services/sync_service.dart

@@ -311,6 +311,8 @@ class SyncService {
       // Do nothing since it's caused mostly due to concurrency issues
       // when the foreground app deletes temporary files, interrupting a background
       // upload
+    } on SilentlyCancelUploadsError {
+      // Do nothing
     } catch (e) {
       throw e;
     }