zulip/zerver
Mateusz Mandera b7b1ec0aeb outgoing_webhook: Improve invalid json handling when parsing response.
It's better to just raise JsonableError here, as that makes this error
processed in the central place for this kind of thing in do_rest_call:
---------
except JsonableError as e:
    response_message = e.msg
    logging.info("Outhook trigger failed:", stack_info=True)
    fail_with_message(event, response_message)
    response_message = f"The outgoing webhook server attempted to send a message in Zulip, but that request resulted in the following error:\n> {e}"
    notify_bot_owner(event, failure_message=response_message)
    return None
----------

which does all the things that are supposed to happen -
fail_with_message, appropriate logging and notifying the bot owner.
2021-04-26 09:32:35 -07:00
..
data_import models/realm: Add a model for storing realm playground information. 2021-04-07 08:20:53 +05:30
lib outgoing_webhook: Improve invalid json handling when parsing response. 2021-04-26 09:32:35 -07:00
management docs: Add missing space to compound verbs “log in”, “set up”, etc. 2021-04-26 09:31:08 -07:00
migrations models: Replace __id syntax with _id where possible. 2021-04-22 14:53:00 -07:00
openapi docs: Capitalize “Markdown” consistently. 2021-04-26 09:31:08 -07:00
templatetags dependencies: Upgrade to webpack-bundle-tracker 1.0.0-alpha.1. 2021-04-06 09:31:35 -07:00
tests outgoing_webhook: Improve invalid json handling when parsing response. 2021-04-26 09:32:35 -07:00
tornado docs: Add missing space to compound verbs “log in”, “set up”, etc. 2021-04-26 09:31:08 -07:00
views docs: Add missing space to compound verbs “log in”, “set up”, etc. 2021-04-26 09:31:08 -07:00
webhooks docs: Fix spelling errors caught by codespell. 2021-04-26 09:31:08 -07:00
worker docs: Fix spelling errors caught by codespell. 2021-04-26 09:31:08 -07:00
__init__.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
apps.py python: Reformat with Black, except quotes. 2021-02-12 13:11:19 -08:00
context_processors.py i18n: Pass language name with every response. 2021-04-24 13:00:27 -07:00
decorator.py docs: Add missing space to compound verbs “log in”, “set up”, etc. 2021-04-26 09:31:08 -07:00
filters.py python: Normalize quotes with Black. 2021-02-12 13:11:19 -08:00
forms.py python: Convert deprecated Django ugettext alias to gettext. 2021-04-15 18:01:34 -07:00
logging_handlers.py docs: Capitalize “Markdown” consistently. 2021-04-26 09:31:08 -07:00
middleware.py python: Convert deprecated Django ugettext alias to gettext. 2021-04-15 18:01:34 -07:00
models.py docs: Fix spelling errors caught by codespell. 2021-04-26 09:31:08 -07:00
signals.py python: Convert deprecated Django ugettext alias to gettext. 2021-04-15 18:01:34 -07:00