def METHOD_NAME(self, url: str, formatting) -> str:
    try:
        return self.http_url.format(time=Time(formatting))
    except TypeError:
        self.logger.error(
            "Wrong formatting parameter: %s. Should be boolean or a time-delta JSON.",
            formatting
        )
        raise
    except KeyError:
        self.logger.error(
            "Wrongly formatted url parameter: %s. Possible misspell with 'time' variable.",
            self.http_url
        )
        raise