2017-07-21 02:20:31 +02:00
|
|
|
from typing import Text
|
|
|
|
|
|
|
|
from django.utils.translation import ugettext as _
|
|
|
|
|
|
|
|
from zerver.lib.exceptions import JsonableError, ErrorCode
|
|
|
|
|
|
|
|
class BadEventQueueIdError(JsonableError):
|
|
|
|
code = ErrorCode.BAD_EVENT_QUEUE_ID
|
|
|
|
data_fields = ['queue_id']
|
|
|
|
|
2017-10-26 11:38:28 +02:00
|
|
|
def __init__(self, queue_id: Text) -> None:
|
2017-07-21 02:20:31 +02:00
|
|
|
self.queue_id = queue_id # type: Text
|
|
|
|
|
|
|
|
@staticmethod
|
2017-10-26 11:38:28 +02:00
|
|
|
def msg_format() -> Text:
|
2017-07-21 02:20:31 +02:00
|
|
|
return _("Bad event queue id: {queue_id}")
|