瀏覽代碼

Add a silent exception for upload errors

Vishnu Mohandas 4 年之前
父節點
當前提交
114511489d
共有 2 個文件被更改,包括 4 次插入0 次删除
  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;
     }