Skip to content

Commit a46bf81

Browse files
author
Artur Chrusciel
committed
task cancelled error message
1 parent 89d9b7a commit a46bf81

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

ios/RNFetchBlobRequest.m

+5-1
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,11 @@ - (void) URLSession:(NSURLSession *)session task:(NSURLSessionTask *)task didCom
374374
});
375375

376376
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+
}
378382
}
379383

380384
if (respFile) {

0 commit comments

Comments
 (0)