mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 05:23:35 +00:00
webhooks: Rename UnexpectedWebhookEventType to UnsupportedWebhookEventType.
Any exception is an "unexpected event", which means talking about having an "unexpected event logger" or "unexpected event exception" is confusing. As the error message in `exceptions.py` already explains, this is about an _unsupported_ event type. This also switches the path that these exceptions are written to, accordingly.
This commit is contained in:
committed by
Tim Abbott
parent
8016769613
commit
9ea9752e0e
@@ -4,7 +4,7 @@ from typing import Any, Callable, Dict, Optional
|
||||
from django.http import HttpRequest, HttpResponse
|
||||
|
||||
from zerver.decorator import api_key_only_webhook_view
|
||||
from zerver.lib.exceptions import UnexpectedWebhookEventType
|
||||
from zerver.lib.exceptions import UnsupportedWebhookEventType
|
||||
from zerver.lib.request import REQ, has_request_variables
|
||||
from zerver.lib.response import json_success
|
||||
from zerver.lib.webhooks.common import (
|
||||
@@ -197,7 +197,7 @@ def gogs_webhook_main(integration_name: str, http_header_name: str,
|
||||
)
|
||||
|
||||
else:
|
||||
raise UnexpectedWebhookEventType('Gogs', event)
|
||||
raise UnsupportedWebhookEventType('Gogs', event)
|
||||
|
||||
check_send_webhook_message(request, user_profile, topic, body)
|
||||
return json_success()
|
||||
|
||||
Reference in New Issue
Block a user