Parcourir la source

Parse default errors separately

Vishnu Mohandas il y a 4 ans
Parent
commit
27d9a570df
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      lib/services/sync_service.dart

+ 1 - 1
lib/services/sync_service.dart

@@ -118,7 +118,7 @@ class SyncService {
       Bus.instance.fire(SyncStatusUpdate(SyncStatus.error,
           error: StorageLimitExceededError()));
     } catch (e, s) {
-      if (e is DioError) {
+      if (e is DioError && e.type == DioErrorType.DEFAULT) {
         final errorCode = e.error?.osError?.errorCode;
         if (errorCode == 111 || errorCode == 7) {
           Bus.instance.fire(SyncStatusUpdate(SyncStatus.paused,