elif mode == "get_video_captions_location":
            output = self.get_video_captions_location(query)
        else:
            output = f"ModeError: Got unexpected mode {mode}."
        try:
            return json.dumps(output)
        except Exception:
            return str(output)