mirror of
https://github.com/zulip/zulip.git
synced 2025-11-10 00:46:03 +00:00
tornado: Use a machine-readable error code when an event queue is gone.
This fixes the original issue that #5598 was the root cause of; when the user returns to a Zulip browser tab after they've been idle past the timeout (10 min, per IDLE_EVENT_QUEUE_TIMEOUT_SECS), we now correctly reload the page even if they're using Zulip in German or another non-English language where we have a translation for the relevant error message.
This commit is contained in:
@@ -35,6 +35,7 @@ class ErrorCode(AbstractEnum):
|
||||
QUOTA_EXCEEDED = ()
|
||||
BAD_NARROW = ()
|
||||
UNAUTHORIZED_PRINCIPAL = ()
|
||||
BAD_EVENT_QUEUE_ID = ()
|
||||
|
||||
class JsonableError(Exception):
|
||||
'''A standardized error format we can turn into a nice JSON HTTP response.
|
||||
|
||||
Reference in New Issue
Block a user