Skip to content

Commit dbdfb60

Browse files
committed
Fix: No logs on some TDR requests that fail or time out (#7404, PR #7422)
2 parents 5b61b66 + 2593157 commit dbdfb60

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/azul/http.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,10 @@ def urlopen(self, method, url, *args, **kwargs) -> urllib3.HTTPResponse:
242242
timeout=timeout / (1 + retries),
243243
**kwargs)
244244
except (urllib3.exceptions.TimeoutError, urllib3.exceptions.MaxRetryError):
245+
# Any wrapped instance of LoggingHttpClient may not have had a
246+
# chance to log anything the response, so we hope that the exception
247+
# captures enough information about the cause.
248+
logging.warning('Exception during request or response', exc_info=True)
245249
raise LimitedTimeoutException(url, timeout)
246250
else:
247251
if response.status in retry.status_forcelist:

0 commit comments

Comments
 (0)