Skip to content

Feature/allow errors to be raised or returned #49

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

Conversation

alexmclarty
Copy link

@alexmclarty alexmclarty commented Aug 9, 2019

PR to allow:

  • errors to be raised with a custom exception (ResultError) which will allow better handling by consumers of the Client class.
  • errors to be returned along with data which will allow consumers of the Client class to act on all errors rather than the first in a list.

I'd like to get some feedback on the approach before merging.

@leszekhanusz
Copy link
Collaborator

I though a lot about this proposal and now think that adding a raise_error flag in the client may not be our best option.

I made a new PR #96 with a proposed alternative.

  • The TransportQueryError exception now returns all errors in an errors attribute.
  • private functions _execute and _subscribe now exist in the sessions and can be used by the user if he wants to have results as ExecutionResult instances with errors instead of data and exceptions.

@alexmclarty alexmclarty deleted the feature/allow_errors_to_be_raised_or_returned branch May 30, 2020 11:09
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.

3 participants