api-python icon indicating copy to clipboard operation
api-python copied to clipboard

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

Open shifucun opened this issue 5 years ago • 1 comments

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

shifucun avatar Aug 24 '20 23:08 shifucun

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

manojbalaji1 avatar Jun 08 '21 06:06 manojbalaji1