mirror of
https://github.com/zulip/zulip.git
synced 2025-11-13 18:36:36 +00:00
Wrap most of fetch_events in a try/except JsonableError.
This is a no-op right now, but we'll want the new structure for the next commit, and splitting this out makes it a lot easier to read what is actually changed in the next commit.
This commit is contained in:
@@ -447,6 +447,7 @@ def fetch_events(query):
|
|||||||
client_type_name = query["client_type_name"]
|
client_type_name = query["client_type_name"]
|
||||||
handler_id = query["handler_id"]
|
handler_id = query["handler_id"]
|
||||||
|
|
||||||
|
try:
|
||||||
was_connected = False
|
was_connected = False
|
||||||
orig_queue_id = queue_id
|
orig_queue_id = queue_id
|
||||||
extra_log_data = ""
|
extra_log_data = ""
|
||||||
@@ -481,6 +482,9 @@ def fetch_events(query):
|
|||||||
if was_connected:
|
if was_connected:
|
||||||
logging.info("Disconnected handler for queue %s (%s/%s)" % (queue_id, user_profile_email,
|
logging.info("Disconnected handler for queue %s (%s/%s)" % (queue_id, user_profile_email,
|
||||||
client_type_name))
|
client_type_name))
|
||||||
|
except JsonableError as e:
|
||||||
|
raise e
|
||||||
|
|
||||||
client.connect_handler(handler_id, client_type_name)
|
client.connect_handler(handler_id, client_type_name)
|
||||||
return (RespondAsynchronously, None)
|
return (RespondAsynchronously, None)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user