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

Uncaught (in promise) Error: Application abort request #201

Open
jhebb opened this issue Jan 30, 2019 · 3 comments
Open

Uncaught (in promise) Error: Application abort request #201

jhebb opened this issue Jan 30, 2019 · 3 comments

Comments

@jhebb
Copy link

jhebb commented Jan 30, 2019

I'm not clear on the purpose of this error, and how I should be catching it to prevent it. It's happening on some reset() calls but not all. I see abort() gets called when the reset action is dispatched but I'm not clear on why it only happens on some resets.

Thanks!

@lexich
Copy link
Owner

lexich commented Jan 31, 2019

Hi @jhebb . Yes reset terminate executing request https://github.com/lexich/redux-api/blob/master/src/actionFn.js#L283

@jhebb
Copy link
Author

jhebb commented Jan 31, 2019

@lexich Why is that an error? Shouldn't it just kill the request silently? Maybe I'm not understanding what the reset action is supposed to do, but I'm expecting it to clear the state whether there's a call in flight or not.

@lexich
Copy link
Owner

lexich commented Feb 1, 2019

When you make request you get promise which returns promise. Promise can be resolved or rejected. Abort make promise rejected because you by default you await receiving data when you have resolved state.

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