projects
/
tweepy.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4f28bd8
)
Log text of HTTP response when handling request error in AsyncBaseStream
author
Harmon
<Harmon758@gmail.com>
Fri, 16 Sep 2022 16:44:07 +0000
(11:44 -0500)
committer
Harmon
<Harmon758@gmail.com>
Fri, 16 Sep 2022 16:44:07 +0000
(11:44 -0500)
tweepy/asynchronous/streaming.py
patch
|
blob
|
blame
|
history
diff --git
a/tweepy/asynchronous/streaming.py
b/tweepy/asynchronous/streaming.py
index 0f374c0934943f639ceb685b368f28727ad3eaac..3b3f28dcdbde87888d6f27350eac877ebfd2a027 100644
(file)
--- a/
tweepy/asynchronous/streaming.py
+++ b/
tweepy/asynchronous/streaming.py
@@
-81,6
+81,15
@@
class AsyncBaseStream:
await self.on_closed(resp)
else:
await self.on_request_error(resp.status)
+ # The error text is logged here instead of in
+ # on_request_error to keep on_request_error
+ # backwards-compatible. In a future version, the
+ # ClientResponse should be passed to
+ # on_request_error.
+ response_text = await resp.text()
+ log.error(
+ "HTTP error response text: %s", response_text
+ )
error_count += 1