Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AbortError is called even though task ended with success status #53

Closed
JkmAS opened this issue Aug 31, 2021 · 1 comment
Closed

AbortError is called even though task ended with success status #53

JkmAS opened this issue Aug 31, 2021 · 1 comment

Comments

@JkmAS
Copy link

JkmAS commented Aug 31, 2021

AbortError is called even though the task ended with success status. This happens to me on route change.

Maybe it's related to this issue #13

const task = useTask(function* (signal) {
    const revert = (error?) => {
      console.log('status': task.last?.status); // success
      notifyError();
    };
    signal.pr.catch(revert); // <-- abort('cancel')
    try {
      yield apiTask.perform();
    } catch (e) {
      revert(e);
    }
  }).drop();
@JkmAS JkmAS changed the title AbortError is called even though task status ended with success AbortError is called even though task ended with success status Aug 31, 2021
@MartinMalinda
Copy link
Owner

Fixed in 2.1.3 76af0d5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants