class AuthenticationException(Exception):
    def __init__(self, message="Session authentication failed."):
        super().__init__(message)


class HTTPException(Exception):
    """Used to describe a communication error between the client and the
    inference server.

    :param code: The HTTP status code generated by the server
    :param message: Description of the error generated by the server
    """

    def __init__(self, code: int, message: str):
        super().__init__(f"Received error {code}: {message}")
