class EventManagerError(Exception):
    def __init__(self, error_message: str):
        self.error_message = error_message


class UnknownError(EventManagerError):
    def __init__(self, token: int, data: bytes):
        try:
            data_text = data.decode("utf-8")
        except UnicodeDecodeError:
            data_text = data.hex()

        super().__init__(f"token: {token}, data: {data_text}")
