class JioSaavnError(Exception):
    def __init__(self, message: str = "JioSaavn API error"):
        self.message = message
        super().__init__(self.message)


class JioSaavnAPIError(JioSaavnError):
    def __init__(self, status_code: int, message: str = ""):
        self.status_code = status_code
        super().__init__(message or f"API returned {status_code}")


class JioSaavnNotFoundError(JioSaavnError):
    def __init__(self, message: str = "Resource not found"):
        super().__init__(message)


class JioSaavnRateLimitError(JioSaavnError):
    def __init__(self, message: str = "Rate limited"):
        super().__init__(message)


class JioSaavnConnectionError(JioSaavnError):
    def __init__(self, message: str = "Connection failed"):
        super().__init__(message)
