mirror of
https://github.com/zulip/zulip.git
synced 2025-11-05 14:35:27 +00:00
api: Cut down a bit on the error handling verbosity.
(imported from commit b665b939f8474f0d631125ecd7c3d300e338ff3c)
This commit is contained in:
@@ -42,14 +42,16 @@ class HumbugAPI():
|
|||||||
# 502/503 typically means the server was restarted; sleep
|
# 502/503 typically means the server was restarted; sleep
|
||||||
# a bit, then try again
|
# a bit, then try again
|
||||||
if self.verbose:
|
if self.verbose:
|
||||||
print "HTTP Error getting zephyrs; trying again soon."
|
|
||||||
print e
|
print e
|
||||||
print traceback.format_exc()
|
print "Error getting zephyrs (probably server restart); retrying..."
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
continue
|
continue
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
# For other errors, just try again
|
# For other errors, just try again
|
||||||
print e
|
if self.verbose:
|
||||||
|
print e
|
||||||
|
print traceback.format_exc()
|
||||||
|
print "Unexpected error! You should send Tim the above traceback. Retrying..."
|
||||||
time.sleep(2)
|
time.sleep(2)
|
||||||
continue
|
continue
|
||||||
for message in sorted(messages, key=lambda x: x["id"]):
|
for message in sorted(messages, key=lambda x: x["id"]):
|
||||||
|
|||||||
Reference in New Issue
Block a user