{"record":{"id":"bf821df8a921b174","repo":"cloudflare/cloudflared","slug":"error-parsing-tunnel-id","errorCode":null,"errorMessage":"error parsing tunnel ID","messagePattern":"error parsing tunnel ID","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/cloudflared/tunnel/subcommands.go","lineNumber":539,"sourceCode":"\t\tCustomHelpTemplate: commandHelpTemplate(),\n\t}\n}\n\nfunc tunnelInfo(c *cli.Context) error {\n\tsc, err := newSubcommandContext(c)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\twarningChecker := updater.StartWarningCheck(c)\n\tdefer warningChecker.LogWarningIfAny(sc.log)\n\n\tif c.NArg() != 1 {\n\t\treturn cliutil.UsageError(`\"cloudflared tunnel info\" accepts exactly one argument, the ID or name of the tunnel to get info about.`)\n\t}\n\ttunnelID, err := sc.findID(c.Args().First())\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"error parsing tunnel ID\")\n\t}\n\n\tclient, err := sc.client()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tclients, err := client.ListActiveClients(tunnelID)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tsortBy := c.String(\"sort-by\")\n\tinvalidSortField := false\n\tsort.Slice(clients, func(i, j int) bool {\n\t\tcmp := func() bool {\n\t\t\tswitch sortBy {\n\t\t\tcase \"id\":","sourceCodeStart":521,"sourceCodeEnd":557,"githubUrl":"https://github.com/cloudflare/cloudflared/blob/2253eeeb25a44a713a4b60b8ba1e1b3f377d1a0f/cmd/cloudflared/tunnel/subcommands.go#L521-L557","documentation":"`cloudflared tunnel info` resolves its single argument (ID or name) to a tunnel UUID via sc.findID. If the argument is neither a valid UUID nor an existing tunnel name, the error is wrapped as 'error parsing tunnel ID'.","triggerScenarios":"Running `cloudflared tunnel info <arg>` with a typo'd tunnel name, a name that doesn't exist in the account, or a malformed UUID — anything for which findID cannot produce a uuid.UUID.","commonSituations":"Passing a deleted tunnel's name; case-sensitivity/typo in tunnel names; passing the credentials file name instead of the tunnel name; unauthenticated context so the name lookup fails.","solutions":["Confirm the exact tunnel name/ID with `cloudflared tunnel list` and retry","If using a name, re-authenticate (`cloudflared tunnel login`) so the lookup API works","If using a UUID, verify it is a complete 8-4-4-4-12 hex string","Check for typos, extra spaces, or wrong credentials-file paths in the argument"],"exampleFix":"// before\ncloudflared tunnel info prod-tunel   # typo, not found\n// after\ncloudflared tunnel list && cloudflared tunnel info prod-tunnel","handlingStrategy":"validation","validationCode":"// resolve name-or-id yourself before calling info:\nvar tunnelID uuid.UUID\nif id, err := uuid.Parse(arg); err == nil {\n\ttunnelID = id\n} else {\n\ttunnelID, err = lookupIDByName(arg) // requires valid cert.pem\n\tif err != nil { return err }\n}","typeGuard":"func isTunnelUUID(v string) bool {\n\t_, err := uuid.Parse(strings.TrimSpace(v))\n\treturn err == nil\n}","tryCatchPattern":"tunnelID, err := sc.findID(c.Args().First())\nif err != nil {\n\treturn fmt.Errorf(\"error parsing tunnel ID: %w\", err)\n}","preventionTips":["Verify the tunnel name exists with `cloudflared tunnel list` before info","Ensure cert.pem exists when resolving by name","Favor UUIDs in automation scripts to skip name resolution","Quote arguments to prevent shell word-splitting"],"tags":["cloudflared","cli","uuid","tunnel"],"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"}