def fetch_and_save(
    browser,
    navigate_url,
    fetch_url,
    config,
    logger,
    wait_time=4,
    min_length=100,
    error_message="Request body is too short, likely an error occurred."
):
    browser.navigate_to(navigate_url, wait_time=wait_time)
    response_body = browser.get_response_body_by_url(fetch_url)
    logger.info("Request body length: %d characters", len(response_body))
    if len(response_body) < min_length:
        logger.error(error_message)
        raise ValueError(error_message)
    logger.info(f"project_dir: {config.sub_project_dir()}")
    file_path = config.get_project_today_file_name()
    with open(file_path, "w") as f:
        f.write(response_body)
    logger.info(f"File written to: {file_path}")