class DomainmasterError(Exception):
    def __init__(
        self,
        message: str,
    ):
        super().__init__(message)

        self._message = message


class NetworkError(Exception):
    def __init__(
        self,
        request,
        previous: Exception = None
    ):
        super().__init__("Network error")

        self._request = request
        self._previous = previous


class SignatureError(DomainmasterError):
    pass


class InvalidSignatureGenerated(DomainmasterError):
    def __init__(self, secret: str, message: str, signature: str):
        self._secret = secret
        self._message = message
        self._signature = signature

    @property
    def secret(self) -> str:
        return self._secret

    @property
    def message(self) -> str:
        return self._message

    @property
    def signature(self) -> str:
        return self._signature
