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

Raise HTTPError in send_request function so client can better handle the error #148

Open
shifucun opened this issue Aug 24, 2020 · 1 comment

Comments

@shifucun
Copy link
Contributor

shifucun commented Aug 24, 2020

Now the send_request function always throws ValueError [1] which is incorrect. For Http error, it should pass it along to client so client can identify if it's server error, argument error or data error.

[1] https://github.com/datacommonsorg/api-python/blob/master/datacommons/utils.py#L113

@manojbalaji1
Copy link
Contributor

@shifucun can you give an example instance, like for what input, its actual output/error, expected output/error?

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

2 participants