From c62c31a0f3574e04b6e2f5996b90b5c1b5917485 Mon Sep 17 00:00:00 2001 From: Harmon Date: Sun, 31 Oct 2021 13:55:26 -0500 Subject: [PATCH] Document HTTPException attributes --- tweepy/errors.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/tweepy/errors.py b/tweepy/errors.py index 3312ec5..6da5575 100644 --- a/tweepy/errors.py +++ b/tweepy/errors.py @@ -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 -- 2.25.1