mirror of
https://github.com/zulip/zulip.git
synced 2025-11-09 16:37:23 +00:00
api: Distinguish Requests connection errors from server 500s.
(imported from commit 1879ea4030c2441c049d9c68684b33a1d2444572)
This commit is contained in:
@@ -36,7 +36,7 @@ class HumbugAPI():
|
|||||||
if str(res.status_code).startswith('5') and self.retry_on_errors:
|
if str(res.status_code).startswith('5') and self.retry_on_errors:
|
||||||
if self.verbose:
|
if self.verbose:
|
||||||
if not had_error_retry:
|
if not had_error_retry:
|
||||||
sys.stdout.write("connection error -- retrying.")
|
sys.stdout.write("connection error %s -- retrying." % (res.status_code,))
|
||||||
had_error_retry = True
|
had_error_retry = True
|
||||||
request["failures"] += 1
|
request["failures"] += 1
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user