{"record":{"id":"b65b27ae5b778142","repo":"cloudflare/cloudflared","slug":"failed-to-parse-quick-tunnel-id","errorCode":null,"errorMessage":"failed to parse quick Tunnel ID","messagePattern":"failed to parse quick Tunnel ID","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/cloudflared/tunnel/quick_tunnel.go","lineNumber":110,"sourceCode":"\tif err := json.Unmarshal(respBody, &data); err != nil {\n\t\trespString := string(respBody)\n\t\tfields := map[string]interface{}{\"status_code\": resp.Status}\n\t\tsc.log.Err(err).Fields(fields).Msgf(\"Error unmarshaling QuickTunnel response: %s\", respString)\n\t\treturn errors.Wrap(err, \"failed to unmarshal quick Tunnel\")\n\t}\n\n\t// TODO(TUN-10791): Add CLI-level coverage that provisioning errors are logged to users.\n\tif len(data.Errors) > 0 {\n\t\treturn fmt.Errorf(\"quick tunnel provisioning failed: %s\", formatQuickTunnelErrors(data.Errors))\n\t}\n\n\tif !data.Success {\n\t\treturn errors.New(\"quick tunnel provisioning failed\")\n\t}\n\n\ttunnelID, err := uuid.Parse(data.Result.ID)\n\tif err != nil {\n\t\treturn errors.Wrap(err, \"failed to parse quick Tunnel ID\")\n\t}\n\n\tcredentials := connection.Credentials{\n\t\tAccountTag:   data.Result.AccountTag,\n\t\tTunnelSecret: data.Result.Secret,\n\t\tTunnelID:     tunnelID,\n\t}\n\n\turl := data.Result.Hostname\n\tif !strings.HasPrefix(url, \"https://\") {\n\t\turl = \"https://\" + url\n\t}\n\n\tcliutil.LogTable(sc.log, []string{\n\t\t\"Your quick Tunnel has been created! Visit it at (it may take some time to be reachable):\",\n\t\turl,\n\t})\n","sourceCodeStart":92,"sourceCodeEnd":128,"githubUrl":"https://github.com/cloudflare/cloudflared/blob/2253eeeb25a44a713a4b60b8ba1e1b3f377d1a0f/cmd/cloudflared/tunnel/quick_tunnel.go#L92-L128","documentation":"Raised in RunQuickTunnel after a successful provisioning response: the JSON was decoded but the returned quick-tunnel ID could not be parsed into a UUID, so the free-tunnel credentials are unusable and the quick tunnel run aborts. Indicates an unexpected/invalid response body from the quick-tunnel service.","triggerScenarios":"uuid.Parse(data.Result.ID) fails after a 2xx response with data.Success == true from the quick-tunnel service.","commonSituations":"A non-Cloudflare/custom quick-service returning success with an arbitrary ID; an API change or truncated response; middlebox tampering with the JSON body.","solutions":["Verify you are using the official default quick-service endpoint (remove custom quick-service overrides)","Retry provisioning — a malformed one-off response may be transient","Upgrade cloudflared to the latest release","Check network middleboxes that could alter response bodies"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"if _, err := uuid.Parse(data.Result.ID); err != nil {\n    return fmt.Errorf(\"quick-tunnel returned invalid tunnel ID %q\", data.Result.ID)\n}","typeGuard":"func isValidUUID(s string) bool {\n    _, err := uuid.Parse(s)\n    return err == nil\n}","tryCatchPattern":null,"preventionTips":["Use only the official quick-service endpoint","Validate the response schema before consuming fields","Alert on malformed API responses from custom endpoints"],"tags":["go","uuid","api","response"],"backgroundTag":"unexpected-response-shape","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"}