Selaa lähdekoodia

task cancelled error message

Artur Chrusciel 6 vuotta sitten
vanhempi
commit
a46bf8180d
1 muutettua tiedostoa jossa 5 lisäystä ja 1 poistoa
  1. 5
    1
      ios/RNFetchBlobRequest.m

+ 5
- 1
ios/RNFetchBlobRequest.m Näytä tiedosto

@@ -374,7 +374,11 @@ typedef NS_ENUM(NSUInteger, ResponseFormat) {
374 374
     });
375 375
     
376 376
     if (error) {
377
-        errMsg = [error localizedDescription];
377
+        if (error.domain == NSURLErrorDomain && error.code == NSURLErrorCancelled) {
378
+            errMsg = @"task cancelled";
379
+        } else {
380
+            errMsg = [error localizedDescription];
381
+        }
378 382
     }
379 383
     
380 384
     if (respFile) {