webhooks: Move UnexpectedWebhookEventType into zerver.lib.exceptions.

8e10ab282a moved UnexpectedWebhookEventType into
`zerver.lib.exceptions`, but left the import into
`zserver.lib.webhooks.common` so that webhooks could continue to
import the exception from there.

This clutters things and adds complexity; there is no compelling
reason that the exception's source of truth should not move alongside
all other exceptions.
This commit is contained in:
Alex Vandiver
2020-08-19 13:14:40 -07:00
committed by Tim Abbott
parent f95dd628bd
commit 8016769613
28 changed files with 49 additions and 36 deletions

View File

@@ -10,12 +10,7 @@ from zerver.lib.actions import (
check_send_stream_message,
send_rate_limited_pm_notification_to_bot_owner,
)
from zerver.lib.exceptions import (
ErrorCode,
JsonableError,
StreamDoesNotExistError,
UnexpectedWebhookEventType,
)
from zerver.lib.exceptions import ErrorCode, JsonableError, StreamDoesNotExistError
from zerver.lib.request import REQ, has_request_variables
from zerver.lib.send_email import FromAddress
from zerver.models import UserProfile