Proposal: Overhaul exception handling in this library #756
Labels
difficulty: unknown or n/a
fix is unknown in difficulty
type: community enhancement
feature request not on Twilio's roadmap
Issue Summary
The entire point of API client wrappers like this is to make it easier to communicate with REST APIs than just using only Python Requests and reading the official REST API Docs.
Currently if I need to get basic debugging details that tell me why a request failed, I have to know about some other lower level library called
python_http_client
(by the way, why not just use Requests as your http client?)So the problem is:
sendgrid/python-http-client
to use this library, then why not just have them use that instead of this library?Steps to Reproduce
python_http_client.exceptions.BadRequestsError
is raised, but there is no message included with details. If I wanted HTTP level exceptions, I'd just use Requests..Expected Results
I expect API Client wrappers to consistently wrap HTTP clients. This includes the regular HTTP CRUD operations and exceptions. For example:
Where
SpecificErrorX
handles a specific class of things that can go wrong ande
contains the nitty gritty details about it.Technical details:
The text was updated successfully, but these errors were encountered: