middleware: Pass unhandled API exceptions through to the test suite.

This results in more useful stack traces in failing tests.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2022-06-23 15:14:37 -07:00
committed by Alex Vandiver
parent 4139427c41
commit 55c0a15f1c
5 changed files with 6 additions and 23 deletions

View File

@@ -1590,7 +1590,7 @@ class WebhookTestCase(ZulipTestCase):
complete_event_type is not None
and all_event_types is not None
and complete_event_type not in all_event_types
):
): # nocoverage
raise Exception(
f"""
Error: This test triggered a message using the event "{complete_event_type}", which was not properly