Skip to content

python-http-client should define it's own error class which can be imported by consuming libraries #16

Closed
@w-

Description

@w-

Issue Summary

If the response is not success (i.e not HTTP2xx) the library throws a urllib HTTPError.
For clients consuming this library, they now need to know that it was implemented in urllib, import that module into their application and handle the error.

Ideally, a consuming application only needs to know about python-http-client and not how urllib was implemented in order to handle common place http errors.

Steps to Reproduce

  1. make an api call that returns anything other than HTTP2xx
  2. attempt to handle error raised without importing urllib and without doing a catch all.

Technical details:

  • python-http-client Version: master (latest commit: [commit number])
  • Python Version: all

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions