TwythonError hides too many details from error message #482
Labels
No labels
Bug
Enhancement
Feature Suggestion
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: code/twython#482
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
errors are raised something like:
In Twitter API docs the errors are assigned an error code
For example the rate limit for posting status updates will return http
403with error code88, but theTwythonErroronly gives us403(plus the message"Rate limit exceeded")So we can match on the text of the error but we wonder if Twitter may localise the text or amend the description at some point.
It would be nice to have access to the error code in
error_code, with the http response status code as a separate attribute. In fact it would be useful to have the whole error body to work with.@anentropic that sounds wonderful. I'd be open to a PR that changes error_code to the Twitter error_code and a new status_code attribute on
TwythonError