{"record":{"id":"5d1d530a674ead1b","repo":"cloudflare/cloudflared","slug":"couldn-t-parse-uuid-from-s","errorCode":null,"errorMessage":"Couldn't parse UUID from %s","messagePattern":"Couldn't parse UUID from (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cfapi/ip_route_filter.go","lineNumber":89,"sourceCode":"\t\treturn nil, err\n\t} else if subset != nil {\n\t\tf.NetworkIsSupersetOf(*subset)\n\t}\n\n\tif superset, err := cidrFromFlag(c, filterSupersetIpRoute); err != nil {\n\t\treturn nil, err\n\t} else if superset != nil {\n\t\tf.NetworkIsSupersetOf(*superset)\n\t}\n\n\tif comment := c.String(filterIpRouteComment.Name); comment != \"\" {\n\t\tf.CommentIs(comment)\n\t}\n\n\tif tunnelID := c.String(filterIpRouteTunnelID.Name); tunnelID != \"\" {\n\t\tu, err := uuid.Parse(tunnelID)\n\t\tif err != nil {\n\t\t\treturn nil, errors.Wrapf(err, \"Couldn't parse UUID from %s\", filterIpRouteTunnelID.Name)\n\t\t}\n\t\tf.TunnelID(u)\n\t}\n\n\tif vnetId := c.String(filterIpRouteByVnet.Name); vnetId != \"\" {\n\t\tu, err := uuid.Parse(vnetId)\n\t\tif err != nil {\n\t\t\treturn nil, errors.Wrapf(err, \"Couldn't parse UUID from %s\", filterIpRouteByVnet.Name)\n\t\t}\n\t\tf.VNetID(u)\n\t}\n\n\tif maxFetch := c.Int(\"max-fetch-size\"); maxFetch > 0 {\n\t\tf.MaxFetchSize(uint(maxFetch))\n\t}\n\n\treturn f, nil\n}","sourceCodeStart":71,"sourceCodeEnd":107,"githubUrl":"https://github.com/cloudflare/cloudflared/blob/2253eeeb25a44a713a4b60b8ba1e1b3f377d1a0f/cfapi/ip_route_filter.go#L71-L107","documentation":"This error is returned by NewIpRouteFilterFromCLI (cfapi/ip_route_filter.go:89) when the value supplied for the tunnel-ID filter flag is not a parseable UUID. The library parses it with github.com/google/uuid.Parse before building the IpRouteFilter; any malformed string (wrong length, non-hex characters, wrong dash placement) causes the wrapped parse error.","triggerScenarios":"Running `cloudflared tunnel route ip show` (showRoutesCommand) with the tunnel-ID filter flag set to a value like `my-tunnel`, `1234`, or a truncated/malformed UUID string instead of a valid UUID (e.g. a name, an ID from a different resource, or a UUID with copy/paste corruption).","commonSituations":"Users pass the tunnel NAME instead of its ID; copy/paste drops or adds characters; scripts interpolate empty or placeholder values; confusion between tunnel ID and connection/credential IDs which have different formats.","solutions":["Run `cloudflared tunnel list` and copy the exact UUID from the ID column for the --tunnel-id filter value","Validate the value with uuid.Parse (or a regex like ^[0-9a-f]{8}-[0-9a-f]{4}-...$) before invoking the command","If a tunnel name is what you have, resolve it to its UUID first via the API/CLI rather than passing the name","Fix shell scripts that substitute empty variables into the flag (quote and check non-empty)"],"exampleFix":"// before (CLI flag value)\ncloudflared tunnel route ip show --tunnel-id my-tunnel\n// after\ncloudflared tunnel list   # find UUID\ncloudflared tunnel route ip show --tunnel-id f5df1b7e-7c99-4e12-a3f9-9d8b2c1a4e55","handlingStrategy":"validation","validationCode":"import \"github.com/google/uuid\"\n\nfunc validUUID(s string) bool {\n    _, err := uuid.Parse(s)\n    return err == nil\n}\n// if !validUUID(tunnelIDFlag) { return fmt.Errorf(\"--tunnel-id must be a UUID, got %q\", tunnelIDFlag) }","typeGuard":"func isUUID(s string) bool {\n    _, err := uuid.Parse(s)\n    return err == nil\n}","tryCatchPattern":null,"preventionTips":["Always pass the tunnel UUID (from `cloudflared tunnel list`), never the name","Validate any CLI/script-provided UUID with uuid.Parse before passing it on","Quote shell variables and fail fast when they are empty","Watch for copy/paste truncation of UUIDs from logs or terminals"],"tags":["uuid","cli","validation","cloudflared"],"backgroundTag":"invalid-identifier-format","analyzedSha":"2253eeeb25a44a713a4b60b8ba1e1b3f377d1a0f","analyzedAt":"2026-09-06T04:14:33.757Z","contentChangedAt":"2026-09-06T04:14:33.757Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}