2021-04-13 11:03:44 +02:00
|
|
|
import logging
|
|
|
|
|
2021-04-09 10:17:38 +02:00
|
|
|
from izihawa_utils.exceptions import BaseError
|
|
|
|
|
|
|
|
|
2021-04-13 11:03:44 +02: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 10:17:38 +02:00
|
|
|
class UnknownFileFormatError(BaseError):
|
2021-04-15 16:14:54 +02:00
|
|
|
level = logging.WARNING
|
2021-04-09 10:17:38 +02:00
|
|
|
code = 'unknown_file_format_error'
|
|
|
|
|
|
|
|
|
2022-03-28 16:39:36 +02:00
|
|
|
class UnknownIndexAliasError(BaseError):
|
|
|
|
code = 'unknown_index_alias_error'
|