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

Make error-passing interface more uniform #545

Open
alanking opened this issue Apr 25, 2024 · 1 comment
Open

Make error-passing interface more uniform #545

alanking opened this issue Apr 25, 2024 · 1 comment
Milestone

Comments

@alanking
Copy link
Contributor

alanking commented Apr 25, 2024

If there were a valid reason for masking the original server-given exception types and codes, it might be to add some consistency to the client interface, as @alanking noted in e-mail discussions today. We should discuss the pros and cons of that here, perhaps, but I'll just note that perhaps we should then:

  • wait for the Python3-only future
  • use the raise-from syntax to transform those errors into something "more consistent". This sets the __cause__ attribute to preserve the original exception.
  • use an Exception type other than ValueError as our error indicator; it's too broad, though probably appropriate in the original usage to identify an invalid scheme here.

Originally posted by @d-w-moore in #518 (comment)

@trel
Copy link
Member

trel commented Apr 25, 2024

wait for the Python3-only future

seems good.

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

No branches or pull requests

2 participants