Skip to content

Commit

Permalink
Document HTTPException attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
Harmon758 committed Oct 31, 2021
1 parent 90fa8f2 commit c62c31a
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion tweepy/errors.py
Expand Up @@ -20,7 +20,19 @@ class TweepyException(Exception):


class HTTPException(TweepyException):
"""Exception raised when an HTTP request fails"""
"""Exception raised when an HTTP request fails
Attributes
----------
response : requests.Response
Requests Response from the Twitter API
api_errors : List[dict[str, Union[int, str]]]
The errors the Twitter API responded with, if any
api_codes : List[int]
The error codes the Twitter API responded with, if any
api_messages : List[str]
The error messages the Twitter API responded with, if any
"""

def __init__(self, response):
self.response = response
Expand Down

0 comments on commit c62c31a

Please sign in to comment.