Pārlūkot izejas kodu

task cancelled error message

Artur Chrusciel 6 gadus atpakaļ
vecāks
revīzija
a46bf8180d
1 mainītis faili ar 5 papildinājumiem un 1 dzēšanām
  1. 5
    1
      ios/RNFetchBlobRequest.m

+ 5
- 1
ios/RNFetchBlobRequest.m Parādīt failu

@@ -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) {