2021-04-13 12:03:44 +03:00
|
|
|
import logging
|
|
|
|
|
2021-04-09 11:17:38 +03:00
|
|
|
from izihawa_utils.exceptions import BaseError
|
|
|
|
|
|
|
|
|
2021-04-13 12:03:44 +03:00
|
|
|
class BannedUserError(BaseError):
|
|
|
|
level = logging.WARNING
|
|
|
|
code = 'banned_user_error'
|
|
|
|
|
|
|
|
def __init__(self, ban_timeout: int):
|
|
|
|
self.ban_timeout = ban_timeout
|
|
|
|
|
|
|
|
|
|
|
|
class MessageHasBeenDeletedError(BaseError):
|
|
|
|
level = logging.WARNING
|
|
|
|
code = 'message_has_been_deleted_error'
|
|
|
|
|
|
|
|
|
2021-04-09 11:17:38 +03:00
|
|
|
class UnknownFileFormatError(BaseError):
|
2021-04-15 17:14:54 +03:00
|
|
|
level = logging.WARNING
|
2021-04-09 11:17:38 +03:00
|
|
|
code = 'unknown_file_format_error'
|
|
|
|
|
|
|
|
|
2022-03-28 17:39:36 +03:00
|
|
|
class UnknownIndexAliasError(BaseError):
|
|
|
|
code = 'unknown_index_alias_error'
|