class BaseExceptionTemplate(Exception):
    """Base exception template for custom exceptions"""

    def __init__(self, message: str, status_code: int = 400):
        self.message = message
        self.status_code = status_code
        super().__init__(self.message)

    def __str__(self):
        return f"{self.__class__.__name__}: {self.message}"

    def json(self):
        return {"error": self.__class__.__name__, "message": self.message}
