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

Throw errors returned from the API instead of returning #62

Merged
merged 2 commits into from
Aug 25, 2022

Conversation

iheanyi
Copy link
Member

@iheanyi iheanyi commented Aug 25, 2022

We should keep one pattern for error handling within our system. Rather than returning errors that we get returned back to us from the API, we can encapsulate them in a DatabaseError, which allows users to handle them all in one way.

Closes #61.

@iheanyi iheanyi requested a review from dgraham August 25, 2022 20:13
@iheanyi iheanyi changed the title Throw errors returned from the API Throw errors returned from the API instead of returning Aug 25, 2022
@iheanyi iheanyi merged commit 88fa69f into main Aug 25, 2022
@iheanyi iheanyi deleted the iheanyi/throw-error-for-query-errors branch August 25, 2022 20:14
@shyim
Copy link

shyim commented Aug 25, 2022

Ohaaa. How fast are you. Thanks! 😍

@reconbot
Copy link

This is great! But also a major breaking change released as a minor change. I'm glad it broke my tests before I upgraded.

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.

Reject promise if query fails
4 participants