{"record":{"id":"dfa9816792aa0335","repo":"istio/istio","slug":"you-must-provide-a-proxyid-in-the-query-string-e","errorCode":null,"errorMessage":" You must provide a proxyID in the query string, e.g. [%s]","messagePattern":" You must provide a proxyID in the query string, e\\.g\\. \\[(.+?)\\]","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"istioctl/pkg/internaldebug/internal-debug.go","lineNumber":72,"sourceCode":"\t}\n\tif !list {\n\t\t_, _ = fmt.Fprint(writer, \"error: according to below command list, please check all supported internal debug commands\\n\")\n\t}\n\treturn xdsResponses, nil\n}\n\nfunc HandlerForDebugErrors(kubeClient kube.CLIClient,\n\tcentralOpts *clioptions.CentralControlPlaneOptions,\n\twriter io.Writer,\n\tistioNamespace string,\n\txdsResponses map[string]*discovery.DiscoveryResponse,\n) (map[string]*discovery.DiscoveryResponse, error) {\n\tfor _, response := range xdsResponses {\n\t\tfor _, resource := range response.Resources {\n\t\t\teString := string(resource.Value)\n\t\t\tswitch {\n\t\t\tcase strings.Contains(eString, \"You must provide a proxyID in the query string\"):\n\t\t\t\treturn nil, fmt.Errorf(\" You must provide a proxyID in the query string, e.g. [%s]\",\n\t\t\t\t\t\"edsz?proxyID=istio-ingressgateway\")\n\n\t\t\tcase strings.Contains(eString, \"404 page not found\"):\n\t\t\t\treturn HandlerForRetrieveDebugList(false, kubeClient, *centralOpts, writer, istioNamespace)\n\t\t\t}\n\t\t}\n\t}\n\treturn nil, nil\n}\n\nfunc DebugCommand(ctx cli.Context) *cobra.Command {\n\tvar opts clioptions.ControlPlaneOptions\n\tvar centralOpts clioptions.CentralControlPlaneOptions\n\n\tdebugCommand := &cobra.Command{\n\t\tUse:   \"internal-debug [<type>/]<name>[.<namespace>]\",\n\t\tShort: \"Retrieves the debug information of istio\",\n\t\tLong: `","sourceCodeStart":54,"sourceCodeEnd":90,"githubUrl":"https://github.com/istio/istio/blob/8dc789c5cf17517c64e3c36cb3288230f149dfae/istioctl/pkg/internaldebug/internal-debug.go#L54-L90","documentation":"HandlerForDebugErrors scans responses from istiod's internal debug endpoints. When a response body contains istiod's 'You must provide a proxyID in the query string' message, istioctl surfaces this reminder instead of printing the raw body: the debug request reached istiod but the query lacked the proxyID parameter that endpoint requires (e.g. edsz?proxyID=...).","triggerScenarios":"Calling istioctl internal-debug / proxy-config debug endpoints with a resource name that omits the ?proxyID=<pod.namespace> suffix; endpoint requested as a bare type when the istiod handler expects proxy-scoped queries.","commonSituations":"Exploring istiod debug endpoints via istioctl x internal-debug and guessing endpoint names.","solutions":["Retry with a proxyID: istioctl x internal-debug 'edsz?proxyID=<pod>.<namespace>'","Run with --list first to enumerate the supported debug endpoints and their expected arguments","Verify the target pod name and namespace are correct so proxyID resolves"],"exampleFix":"# before\nistioctl x internal-debug edsz\n# after\nistioctl x internal-debug 'edsz?proxyID=istio-ingressgateway.istio-system'","handlingStrategy":"validation","validationCode":"// Always include proxyID when querying proxy-scoped debug endpoints\nif !strings.Contains(debugEndpoint, \"proxyID=\") {\n\tdebugEndpoint = debugEndpoint + \"?proxyID=\" + podName + \".\" + namespace\n}","typeGuard":null,"tryCatchPattern":"resp, err := HandlerForDebugErrors(kubeClient, centralOpts, w, istioNS, xdsResponses)\nif err != nil && strings.Contains(err.Error(), \"proxyID\") {\n\t// re-issue the query with a proxyID instead of failing\n\treturn queryDebug(fmt.Sprintf(\"%s?proxyID=%s.%s\", endpoint, pod, ns))\n}","preventionTips":["Use --list to learn which debug endpoints require proxyID before querying them","Standardize debug queries as '<type>z?proxyID=<pod>.<namespace>'","Confirm target pod names/namespaces exist before building proxyID strings"],"tags":["istioctl","internal-debug","istiod","proxyid"],"backgroundTag":null,"analyzedSha":"8dc789c5cf17517c64e3c36cb3288230f149dfae","analyzedAt":"2026-08-15T15:16:55.434Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}