Skip to content

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

@shifucun

Description

@shifucun

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions