Skip to content

Throw errors returned from the API instead of returning - #62

Merged
iheanyi merged 2 commits into
mainfrom
iheanyi/throw-error-for-query-errors
Aug 25, 2022
Merged

iheanyi merged 2 commits into
mainfrom
iheanyi/throw-error-for-query-errors

Conversation

@iheanyi

@iheanyi iheanyi commented Aug 25, 2022

Copy link
Copy Markdown
Contributor

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

shyim commented Aug 25, 2022

Copy link
Copy Markdown

Ohaaa. How fast are you. Thanks! 😍

@reconbot

Copy link
Copy Markdown

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