mirror of https://github.com/zulip/zulip.git
b7b1ec0aeb
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. |
||
---|---|---|
.. | ||
data_import | ||
lib | ||
management | ||
migrations | ||
openapi | ||
templatetags | ||
tests | ||
tornado | ||
views | ||
webhooks | ||
worker | ||
__init__.py | ||
apps.py | ||
context_processors.py | ||
decorator.py | ||
filters.py | ||
forms.py | ||
logging_handlers.py | ||
middleware.py | ||
models.py | ||
signals.py |