Skip to content
This repository was archived by the owner on Mar 16, 2019. It is now read-only.

Android cancel does not fire catch block #555

Open
mdrbohlav opened this issue Oct 9, 2017 · 1 comment
Open

Android cancel does not fire catch block #555

mdrbohlav opened this issue Oct 9, 2017 · 1 comment

Comments

@mdrbohlav
Copy link

mdrbohlav commented Oct 9, 2017

When canceling task on Android the catch method does not run, the then runs. The callback does.

const task = RNFetchBlob.config(config)
    .fetch('GET', url)
    .then((res) => {
        RUNS ON ANDROID ON CANCEL
    })
    .catch(() => {
        NEVER RUNS ON ANDROID WHEN CANCELED
    });

task.cancel(() => {
    RUNS WHEN CANCELED
});

RN: 0.48.1
RN-FETCH-BLOB: 0.10.8

@jankarres
Copy link

+1

jankarres pushed a commit to jankarres/react-native-fetch-blob that referenced this issue Oct 22, 2017
jankarres pushed a commit to jankarres/react-native-fetch-blob that referenced this issue Oct 22, 2017
jiabinxu added a commit to jiabinxu/react-native-fetch-blob that referenced this issue Jan 4, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants