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

[FIX] Fix case where priming an Error results in UnhandledPromiseRejection #223

Merged
merged 1 commit into from Nov 14, 2019

Conversation

leebyron
Copy link
Contributor

@leebyron leebyron commented Nov 14, 2019

Because the cache stores Promises instead of values, we need to store a rejected promise for error cases.

In the case we want to prime such an error, a new rejected Promise is created and stored for later access. This is an unhandled promise rejection. However this is an intentionally unhandled rejection since it is stored for later access.

However this also masks another minor bug (#224) where loading that primed Error but not handling it should result in an UnhandledPromiseRejection but does not.

@leebyron leebyron force-pushed the fix-prime-error branch 2 times, most recently from 7d03ded to 931eb51 Compare November 14, 2019 22:26
@leebyron leebyron merged commit 29811db into master Nov 14, 2019
@leebyron leebyron deleted the fix-prime-error branch November 14, 2019 22:30
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

Successfully merging this pull request may close these issues.

None yet

1 participant