You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
and then calling task.cancel(), I observe different behavior on iOS vs android.
iOS: handleError(err) gets called where err.message === 'cancelled'. So this is nicely catcheable.
android: handleSuccess(success) is called, where success has a HTTP code 206, which suggests that the range request was satisfied? It looks exactly like the response I get when the request finished successfully. Here is the content of respInfo, and it is the same whether I cancel the task or not:
Not really sure what @gigby is saying but the issue is on iOS task.cancel() throws a catchable error while Android it doesn't throw an error and succeeds normally. There is PR up here => #363
react-native-cli: 2.0.1
react-native: 0.51.0
RNFetchBlob: 0.10.8
So when downloading something like so:
and then calling
task.cancel()
, I observe different behavior on iOS vs android.iOS:
handleError(err)
gets called whereerr.message === 'cancelled'
. So this is nicely catcheable.android:
handleSuccess(success)
is called, wheresuccess
has a HTTP code 206, which suggests that the range request was satisfied? It looks exactly like the response I get when the request finished successfully. Here is the content ofrespInfo
, and it is the same whether I cancel the task or not:Any takes on why this happens?
The text was updated successfully, but these errors were encountered: