Browse Source

task cancelled error message

Artur Chrusciel 7 years ago
parent
commit
a46bf8180d
1 changed files with 5 additions and 1 deletions
  1. 5
    1
      ios/RNFetchBlobRequest.m

+ 5
- 1
ios/RNFetchBlobRequest.m View File

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