"""GoldHold exceptions. Patent Pending. All Auto Tunes LLC. U.S. #63/988,484."""


class GoldHoldError(Exception):
    def __init__(self, message, status_code=None, response=None):
        super().__init__(message)
        self.status_code = status_code
        self.response = response


class AuthError(GoldHoldError):
    pass


class RateLimitError(GoldHoldError):
    def __init__(self, message, status_code=429, response=None, vector_limit=False):
        super().__init__(message, status_code, response)
        self.vector_limit = vector_limit


class VectorLimitError(RateLimitError):
    def __init__(self, message="Vector limit reached", response=None):
        super().__init__(message, 429, response, vector_limit=True)
