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.
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:
__cause__
attribute to preserve the original exception.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 https://github.com/irods/python-irodsclient/issues/518#issuecomment-1960868305