mirror of https://github.com/zulip/zulip.git
9faa44af60
This provides the main infrastructure for fixing #5598. From here, it's a matter of on the one hand upgrading exception handlers -- the many except-blocks in the codebase that look for JsonableError -- to look beyond the string `msg` and pass on the machine-readable full error information to their various downstream recipients, and on the other hand adjusting places where we raise errors to take advantage of this mechanism to give the errors structured details. In an ideal future, I think all exception handlers that look (or should look) for a JsonableError would use its contents in structured form, never mentioning `msg`; but the majority of error sites might continue to just instantiate JsonableError with a string message. The latter is the simplest thing to do, and probably most error types will never have code looking for them specifically. Because the new API refactors the `to_json_error_msg` method which was designed for subclasses to override, update the 4 subclasses that did so to take full advantage of the new API instead. |
||
---|---|---|
.. | ||
__init__.py | ||
alert_words.py | ||
attachments.py | ||
auth.py | ||
compatibility.py | ||
custom_profile_fields.py | ||
email_mirror.py | ||
events_register.py | ||
home.py | ||
hotspots.py | ||
integrations.py | ||
invite.py | ||
messages.py | ||
muting.py | ||
pointer.py | ||
presence.py | ||
push_notifications.py | ||
reactions.py | ||
realm.py | ||
realm_domains.py | ||
realm_emoji.py | ||
realm_filters.py | ||
realm_icon.py | ||
registration.py | ||
report.py | ||
streams.py | ||
test_emails.py | ||
tutorial.py | ||
typing.py | ||
unsubscribe.py | ||
upload.py | ||
user_settings.py | ||
users.py | ||
zephyr.py |