webhooks: Stop raising an exception if stream does not exist.

webhook-errors.log file is cluttered with Stream.DoesNotExist
errors, which hides the errors that we actually need to see. So,
since check_message already sends the bot_owner a PM if the webhook
bot tries to send a message to a non-existent stream, we can ignore
such exceptions.
This commit is contained in:
Eeshan Garg
2018-03-22 18:13:28 -02:30
committed by Tim Abbott
parent 4b8bd0bc3b
commit 538746fc65
6 changed files with 44 additions and 7 deletions

View File

@@ -652,7 +652,8 @@ class WebhookTestCase(ZulipTestCase):
if content_type is not None:
kwargs['content_type'] = content_type
msg = self.send_json_payload(self.test_user, self.url, payload,
sender = kwargs.get('sender', self.test_user)
msg = self.send_json_payload(sender, self.url, payload,
stream_name=None, **kwargs)
self.do_test_message(msg, expected_message)