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

Use reject to prevent errors from being swallowed #143

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

fvieira
Copy link

@fvieira fvieira commented Jan 15, 2018

When an error is thrown inside a Promise it normally rejects, but if the error is thrown from inside a callback, i.e. in an async manner, the only way to make the Promise reject is to call the reject callback, otherwise the Error thrown ends up nowhere and the Promise never resolves or rejects, resulting in weird errors on Graphcool (which could handle this better too)...

This PR uses the reject callback to solve this problem.

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

Successfully merging this pull request may close these issues.

None yet

1 participant