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

Propagate HTTP exceptions upstream instead of catching and returning it #181

Open
traut opened this issue Mar 25, 2015 · 0 comments
Open

Comments

@traut
Copy link
Contributor

traut commented Mar 25, 2015

libtaxii.clients.call_taxii_service2 catches urllib2.HTTPError and returns it as a normal result (https://github.com/TAXIIProject/libtaxii/blob/master/libtaxii/clients.py#L344). This way the exception is masked and user is forced to check returned object type.

A pythonistic and simple solution here would be to re-raise this exception as is or wrapped in custom libtaxii-specific exception.

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

No branches or pull requests

1 participant