projects
/
tweepy.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2c7213d
)
Log text of HTTP response when handling request error in BaseStream
author
Harmon
<Harmon758@gmail.com>
Wed, 1 Jun 2022 13:26:08 +0000
(08:26 -0500)
committer
Harmon
<Harmon758@gmail.com>
Wed, 1 Jun 2022 13:26:38 +0000
(08:26 -0500)
tweepy/streaming.py
patch
|
blob
|
blame
|
history
diff --git
a/tweepy/streaming.py
b/tweepy/streaming.py
index 9ff3746ec2f645718c12b023b1806dfdc6b226b2..041f3eb8f2d887c8311f63f01669f23ebef762b8 100644
(file)
--- a/
tweepy/streaming.py
+++ b/
tweepy/streaming.py
@@
-100,6
+100,13
@@
class BaseStream:
self.on_request_error(resp.status_code)
if not self.running:
break
+ # The error text is logged here instead of in
+ # on_request_error to keep on_request_error
+ # backwards-compatible. In a future version, the
+ # Response should be passed to on_request_error.
+ log.error(
+ "HTTP error response text: %s", resp.text
+ )
error_count += 1