-
Notifications
You must be signed in to change notification settings - Fork 3
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
Improve error handling #16
Conversation
It seems there are no tests right now that would check new error handling code; while I don't think we need to cover every API method error handling, if we extract common error handling logic it can be tested just once for 1 API method. While it's not possible to make real Stakewise backend to return errors on-demand, we can use mocking of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Return an error in these scenarios:
errors
fieldTest fixes:
Now that we return errors for length 0 arrays, we need to mock graphql responses for certain tests