def new_chain(table='filter', chain=None, table_type=None, hook=None, priority=None, family='ipv4'):

    if not chain:
        return 'Error: Chain needs to be specified'

    if not check_table(table, family=family):
        return 'Error: table {0} in family {1} does not exist'.\
                format(table, family)

    if check_chain(table, chain, family=family):
        return 'Error: chain {0} in table {1} in family {2} already exists'.\
                format(chain, table, family)

    nft_family = _NFTABLES_FAMILIES[family]
    cmd = '{0} add chain {1} {2} {3}'.\
            format(_nftables_cmd(), nft_family, table, chain)
    if table_type or hook or priority:
        if table_type and hook and str(priority):
            cmd = r'{0} \{{ type {1} hook {2} priority {3}\; \}}'.\
                    format(cmd, table_type, hook, priority)
        else:
            # Specify one, rqeuire all
            return 'Error: table_type hook and priority required'

    out = __salt__['cmd.run'](cmd, python_shell=False)

    if not out:
        out = True
    return out
error(message: string)
dataset/ETHPy150Open saltstack/salt/salt/modules/nftables.py/new_chain--crossover with--dataset/ETHPy150Open kwminnick/rackspace-dns-cli/dnsclient/shell.py/RackDNSClientArgumentParser.error