zulip/zerver/tornado
Greg Price 124d623d05 tornado/socket: Replace an ad-hoc error class with JsonableError.
The one purpose this exception was serving was to carry a message
in `msg`.  We can do that with `JsonableError`, and as a bonus replace
a repetition of the familiar "'result': 'error', ..." JSON pattern
with a call to a common implementation.

Also wrap the error messages for translation -- we hadn't been doing
that, oops.  Our linter notices that issue now that it's the familiar
JsonableError class.

There's one other potential change in behavior here: this
except-clause might now catch a JsonableError raised from some other
code.  That seems like a bonus, if so; the handler isn't doing
anything actually specific to this code, and the more exceptions it
successfully turns into proper error responses to the client and lines
in the log, the better.
2017-07-24 16:41:22 -07:00
..
__init__.py tornado: Move tornado_ioloop_logging to new zerver/tornado tree. 2016-11-26 21:24:05 -08:00
application.py tornado: Close queue connection on reload. 2017-07-21 11:19:26 -07:00
descriptors.py pep8: Add compliance with rule E261 to descriptors.py. 2017-05-07 23:21:50 -07:00
event_queue.py JsonableError: Optionally carry error codes and structured data. 2017-07-24 16:41:22 -07:00
handlers.py Django 1.11: MIDDLEWARE_CLASSES setting is deprecated. 2017-06-13 15:04:04 -07:00
ioloop_logging.py pep8: Add compliance with rule E261 to ioloop_logging.py. 2017-05-07 23:21:50 -07:00
socket.py tornado/socket: Replace an ad-hoc error class with JsonableError. 2017-07-24 16:41:22 -07:00
views.py decorator: Add support for Django internal_notify_view. 2017-04-18 09:59:07 -07:00
websocket_client.py Revert commits related to client_message_id. 2017-07-14 12:13:35 -07:00