{"record":{"id":"397766cae5cc520c","repo":"cloudflare/cloudflared","slug":"erraddroute","errorCode":"errAddRoute","errorMessage":"You must supply exactly one argument, the ID or CIDR of the route you want to delete","messagePattern":"You must supply exactly one argument, the ID or CIDR of the route you want to delete","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/cloudflared/tunnel/teamnet_subcommands.go","lineNumber":25,"sourceCode":"\t\"text/tabwriter\"\n\n\t\"github.com/google/uuid\"\n\t\"github.com/pkg/errors\"\n\t\"github.com/urfave/cli/v2\"\n\n\t\"github.com/cloudflare/cloudflared/cfapi\"\n\t\"github.com/cloudflare/cloudflared/cmd/cloudflared/cliutil\"\n\t\"github.com/cloudflare/cloudflared/cmd/cloudflared/updater\"\n)\n\nvar (\n\tvnetFlag = &cli.StringFlag{\n\t\tName:    \"vnet\",\n\t\tAliases: []string{\"vn\"},\n\t\tUsage:   \"The ID or name of the virtual network to which the route is associated to.\",\n\t}\n\n\terrAddRoute = errors.New(\"You must supply exactly one argument, the ID or CIDR of the route you want to delete\")\n)\n\nfunc buildRouteIPSubcommand() *cli.Command {\n\treturn &cli.Command{\n\t\tName:      \"ip\",\n\t\tUsage:     \"Configure and query Cloudflare WARP routing to private IP networks made available through Cloudflare Tunnels.\",\n\t\tUsageText: \"cloudflared tunnel [--config FILEPATH] route COMMAND [arguments...]\",\n\t\tDescription: `cloudflared can provision routes for any IP space in your corporate network. Users enrolled in\nyour Cloudflare for Teams organization can reach those IPs through the Cloudflare WARP\nclient. You can then configure L7/L4 filtering on https://one.dash.cloudflare.com to\ndetermine who can reach certain routes.\nBy default IP routes all exist within a single virtual network. If you use the same IP\nspace(s) in different physical private networks, all meant to be reachable via IP routes,\nthen you have to manage the ambiguous IP routes by associating them to virtual networks.\nSee \"cloudflared tunnel vnet --help\" for more information.`,\n\t\tSubcommands: []*cli.Command{\n\t\t\t{\n\t\t\t\tName:      \"add\",","sourceCodeStart":7,"sourceCodeEnd":43,"githubUrl":"https://github.com/cloudflare/cloudflared/blob/2253eeeb25a44a713a4b60b8ba1e1b3f377d1a0f/cmd/cloudflared/tunnel/teamnet_subcommands.go#L7-L43","documentation":"errAddRoute is the shared validation error for the teamnet route commands: `cloudflared tunnel route ip delete` (and add) requires exactly one positional argument — a route ID or CIDR. It is returned when NArg != 1 or when the argument is not a valid IP/CIDR (net.ParseCIDR fails for delete).","triggerScenarios":"Running `cloudflared tunnel route ip delete` with zero or multiple arguments; passing a value that is neither a valid IP nor CIDR (e.g. `10.0.0.1/33`, a hostname, or a malformed route UUID).","commonSituations":"Forgetting the argument in health-check or cleanup scripts; typos in CIDR notation; passing a hostname instead of a CIDR; pasting extra tokens so NArg > 1.","solutions":["Supply exactly one argument: `cloudflared tunnel route ip delete 10.0.0.0/8`.","Validate CIDR notation (use `ipcalc` or similar) before running in scripts.","Check `cloudflared tunnel route ip show` first to get the exact ID/CIDR to delete.","Quote the CIDR so the shell does not split or glob it."],"exampleFix":"// before\ncloudflared tunnel route ip delete\n// after\ncloudflared tunnel route ip delete 10.0.0.0/8","handlingStrategy":"validation","validationCode":"if [ \"$#\" -ne 1 ]; then\n  echo \"usage: cloudflared tunnel route ip delete <cidr|id>\" >&2; exit 1\nfi\nif ! python3 -c \"import ipaddress,sys; ipaddress.ip_network(sys.argv[1])\" \"$1\" 2>/dev/null; then\n  echo \"$1 is not a valid IP or CIDR\" >&2; exit 1\nfi","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Assert exactly one positional argument in wrapper scripts.","Validate CIDR/IP syntax before calling route commands.","Quote arguments to prevent shell splitting/globbing."],"tags":["cli","routing","validation","cidr"],"backgroundTag":"missing-required-argument","analyzedSha":"2253eeeb25a44a713a4b60b8ba1e1b3f377d1a0f","analyzedAt":"2026-09-06T04:14:33.757Z","contentChangedAt":"2026-09-06T04:14:33.757Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}