Skip to content
This repository was archived by the owner on Mar 16, 2019. It is now read-only.
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

Description

@mdrbohlav

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions