zulip/zerver/views
Greg Price 9faa44af60 JsonableError: Optionally carry error codes and structured data.
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.
2017-07-24 16:41:22 -07:00
..
__init__.py
alert_words.py tidying: Combine multiple 'import typing' lines onto one line. 2017-07-16 16:43:21 -07:00
attachments.py Add support for managing and deleting attachments. 2017-02-16 23:44:44 -08:00
auth.py confirmation: Liberate get_link_for_object from ConfirmationManager. 2017-07-17 23:18:47 -07:00
compatibility.py mypy: Add check for parse_user_agent returning None in compatibility.py. 2017-07-08 10:49:42 -07:00
custom_profile_fields.py profile: Support custom profile data. 2017-04-18 15:20:59 -07:00
email_mirror.py email mirror: Fix mypy annotation error. 2017-04-24 22:01:48 -07:00
events_register.py tidying: Combine multiple 'import typing' lines onto one line. 2017-07-16 16:43:21 -07:00
home.py Delete the old zulip.com "referrals" system. 2017-07-07 14:59:18 -07:00
hotspots.py hotspots: Add backend support for tutorial hotspots. 2017-03-29 11:34:32 -07:00
integrations.py Improve /integrations page load time. 2017-07-13 20:37:09 -07:00
invite.py Delete the old zulip.com "referrals" system. 2017-07-07 14:59:18 -07:00
messages.py JsonableError: Optionally carry error codes and structured data. 2017-07-24 16:41:22 -07:00
muting.py Implemented API routes for muting/unmuting a topic 2017-03-15 16:19:00 -07:00
pointer.py
presence.py views/presence: Refactor get_user_profile_by_email -> get_user. 2017-05-22 16:43:08 -07:00
push_notifications.py push_notifications: Fix mypy annotation logic around push tokens. 2017-07-07 10:54:37 -07:00
reactions.py reactions: Fix reacting to messages on streams you're not subscribed to. 2017-03-22 20:22:13 -07:00
realm.py org-permissions: Add allow_edit_history organiztion setting. 2017-07-16 10:10:06 -07:00
realm_domains.py realm_domains: Restructure library for getting realm domains. 2017-04-28 21:11:56 -07:00
realm_emoji.py realm_emoji.py: Allow an user to delete an emoji uploaded by them. 2017-05-29 20:21:25 -07:00
realm_filters.py
realm_icon.py Add size limit for uploading user avatars and realm icons. 2017-03-07 22:13:01 -08:00
registration.py registration: Remove organization type selection in realm creation. 2017-07-21 13:09:06 -07:00
report.py tidying: Combine multiple 'import typing' lines onto one line. 2017-07-16 16:43:21 -07:00
streams.py JsonableError: Optionally carry error codes and structured data. 2017-07-24 16:41:22 -07:00
test_emails.py emails: Add to_user_id argument to send_email. 2017-07-16 16:56:39 -07:00
tutorial.py
typing.py mypy: Added Dict, List and Set imports. 2017-03-04 14:33:44 -08:00
unsubscribe.py emails: Rename clear_followup_emails_queue. 2017-07-17 16:05:38 -07:00
upload.py mypy: serve_local return type to FileResponse. 2017-05-25 15:41:52 -07:00
user_settings.py confirmation: Remove ConfirmationManager. 2017-07-17 23:18:47 -07:00
users.py views: Remove unused get_user_profile_by_email import from users. 2017-07-20 16:50:23 -07:00
zephyr.py bots: Move zephyr-related files to api/integrations/zephyr/. 2017-05-26 15:07:02 -07:00