Skip to content
This repository was archived by the owner on Jun 13, 2023. It is now read-only.

Commit 17e7855

Browse files
authored
fix/urrlib3-event-collection-failed (#351)
1 parent 857cf86 commit 17e7855

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

epsagon/events/urllib3.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,11 @@ def update_response(self, response):
113113
'response_headers',
114114
headers
115115
)
116-
response_body = response.peek()
116+
response_body = (
117+
response.peek()
118+
if getattr(response, 'peek', None)
119+
else response.data
120+
)
117121
if isinstance(response_body, bytes):
118122
try:
119123
response_body = response_body.decode('utf-8')

0 commit comments

Comments
 (0)