Skip to content

sendgrid-python should define it's own Error class #315

Closed
@w-

Description

@w-

Issue Summary

related to sendgrid/python-http-client#16

Crurently if an application/library consumes sendgrid-python and an API request surfaces a HTTP error, it raises a urllib HTTPError.

Now, in order to handle this specific error, the consuming application needs to import urllib.

Ideally, a consuming application only needs to know about sendgrid-python and not the underlying implementation of python-http-client or urllib 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:

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions