mirror of
https://github.com/zulip/zulip.git
synced 2025-11-15 19:31:58 +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"]
|
||||
handler_id = query["handler_id"]
|
||||
|
||||
try:
|
||||
was_connected = False
|
||||
orig_queue_id = queue_id
|
||||
extra_log_data = ""
|
||||
@@ -481,6 +482,9 @@ def fetch_events(query):
|
||||
if was_connected:
|
||||
logging.info("Disconnected handler for queue %s (%s/%s)" % (queue_id, user_profile_email,
|
||||
client_type_name))
|
||||
except JsonableError as e:
|
||||
raise e
|
||||
|
||||
client.connect_handler(handler_id, client_type_name)
|
||||
return (RespondAsynchronously, None)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user