{"record":{"id":"8fd288292a034620","repo":"slimtoolkit/slim","slug":"invalid-http-probe-command-s","errorCode":null,"errorMessage":"invalid HTTP probe command: %s","messagePattern":"invalid HTTP probe command: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/app/master/command/clifvparser.go","lineNumber":635,"sourceCode":"\t\t\t\treturn nil, fmt.Errorf(\"invalid HTTP probe command protocol: %+v\", raw)\n\t\t\t}\n\n\t\t\tproto = strings.ToLower(parts[0])\n\n\t\t\tif parts[1] != \"\" && !isMethod(parts[1]) {\n\t\t\t\treturn nil, fmt.Errorf(\"invalid HTTP probe command method: %+v\", raw)\n\t\t\t}\n\n\t\t\tmethod = strings.ToUpper(parts[1])\n\n\t\t\tif parts[2] == \"\" || !isResource(parts[2]) {\n\t\t\t\treturn nil, fmt.Errorf(\"invalid HTTP probe command resource: %+v\", raw)\n\t\t\t}\n\n\t\t\tresource = parts[2]\n\n\t\tdefault:\n\t\t\treturn nil, fmt.Errorf(\"invalid HTTP probe command: %s\", raw)\n\t\t}\n\n\t\tcmd := config.HTTPProbeCmd{\n\t\t\tProtocol: proto,\n\t\t\tMethod:   method,\n\t\t\tResource: resource,\n\t\t\tCrawl:    crawl,\n\t\t}\n\t\tprobes = append(probes, cmd)\n\t}\n\n\treturn probes, nil\n}\n\nfunc ParseHTTPProbesFile(filePath string) ([]config.HTTPProbeCmd, error) {\n\tprobes := []config.HTTPProbeCmd{}\n\n\tif filePath != \"\" {","sourceCodeStart":617,"sourceCodeEnd":653,"githubUrl":"https://github.com/slimtoolkit/slim/blob/81940d17fa112cc678e32209214bcb2355cb3004/pkg/app/master/command/clifvparser.go#L617-L653","documentation":"ParseHTTPProbes splits each raw probe on ':' and supports 0-3 segments. If a raw string contains more than 3 colon-separated parts (default branch), it cannot be interpreted as proto:method:resource and the parser rejects it with this error.","triggerScenarios":"GetHTTPProbes/ParseHTTPProbes called with a raw value like 'http:GET:/path:extra' (4+ parts), or URLs that embed unescaped colons such as 'http:GET:/a:b' or 'localhost:8080/health'.","commonSituations":"Users pasting full URLs with ports ('http://host:8080/x') into the probe field, IPv6 addresses with colons, or query strings containing ':' characters.","solutions":["Reduce the probe to at most 3 colon-separated segments: PROTOCOL:METHOD:RESOURCE","Escape or remove extra colons (ports, IPv6, query values) from the probe string","Use the JSON probe config file (ParseHTTPProbesFile) instead, which takes structured fields and avoids colon splitting"],"exampleFix":"// before\nGetHTTPProbes(\"http:GET:/api:8080/health\")\n// error: invalid HTTP probe command\n// after\nGetHTTPProbes(\"http:GET:/api/health\") // put the port in a separate config field, not the resource string","handlingStrategy":"validation","validationCode":"if strings.Count(probe, \":\") > 2 {\n    return fmt.Errorf(\"probe %q must have at most 3 colon-separated segments\", probe)\n}","typeGuard":null,"tryCatchPattern":"probes, err := GetHTTPProbes(raw)\nif err != nil {\n    if strings.Contains(err.Error(), \"invalid HTTP probe command:\") {\n        return nil, fmt.Errorf(\"probe %q has too many ':' segments; move ports to config\", raw)\n    }\n    return nil, err\n}","preventionTips":["Never embed URLs with ports or IPv6 addresses in probe strings","Strip scheme prefixes like 'http://' before passing (extra colons/slashes break parsing)","Use the JSON probe config file for anything beyond PROTO:METHOD:PATH"],"tags":["http","config-parsing","validation"],"backgroundTag":"invalid-http-probe-command","analyzedSha":"81940d17fa112cc678e32209214bcb2355cb3004","analyzedAt":"2026-08-31T23:06:12.682Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T05:18:18.240Z"}