def METHOD_NAME(run_line, go_ep1_id, go_ep2_id):
    """
    Confirms using --exclude on non recursive transfers raises errors
    """
    # would be better if this could fail before we make any api calls, but
    # we want to build the transfer_data object before we parse batch input
    load_response_set("cli.get_submission_id")
    result = run_line(
        "globus transfer --exclude *.txt " "{}:/ {}:/".format(go_ep1_id, go_ep1_id),
        assert_exit_code=2,
    )
    assert (
        "--include and --exclude can only be used with --recursive transfers"
        in result.stderr
    )