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

Cannot properly handle errors in refresh() #2

Open
apomortsev opened this issue May 26, 2017 · 4 comments
Open

Cannot properly handle errors in refresh() #2

apomortsev opened this issue May 26, 2017 · 4 comments
Assignees
Labels
Milestone

Comments

@apomortsev
Copy link

Hello, First of all thank you for creating this package, I'm finding it very useful. I'm having an issue with gracefully handling the error when refresh() fails to produce a valid token. Returning a resolved promise from refresh() with no token causes _schedule() to throw internally. A rejected promise from referesh() is re-thrown in execute(). In both cases the resulting rejected promise cannot be handled in user code resulting in an unhandled rejection error.

@cchamberlain
Copy link
Member

@apomortsev - thanks for reporting, I'll get a unit test in to try and repro your findings and get it patched up (today / this weekend depending on time).

@cchamberlain cchamberlain self-assigned this May 27, 2017
@cchamberlain cchamberlain added this to the 1.0 milestone May 27, 2017
@cchamberlain
Copy link
Member

Lost track of this one. Planning to get back to it after I get v2 out for https://github.com/noderaider/redux-idle-monitor

@puneetv05
Copy link

hi @apomortsev did you find any alternatives?

@apomortsev
Copy link
Author

Hi @puneetverma05, no, not at the time. But it's been some time and chances are there might be some similar or more suitable packages around, but I never checked.

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

No branches or pull requests

3 participants