{"record":{"id":"13c5443c031006b7","repo":"grafana/k6","slug":"error-parsing-blacklist-ip-s-w","errorCode":null,"errorMessage":"error parsing blacklist-ip '%s': %w","messagePattern":"error parsing blacklist-ip '(.+?)': %w","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/cmd/options.go","lineNumber":173,"sourceCode":"\t\topts.ExecutionSegmentSequence = segmentSequence\n\t}\n\n\tif flags.Changed(\"system-tags\") {\n\t\tsystemTagList, err := flags.GetStringSlice(\"system-tags\")\n\t\tif err != nil {\n\t\t\treturn opts, err\n\t\t}\n\t\topts.SystemTags = metrics.ToSystemTagSet(systemTagList)\n\t}\n\n\tblacklistIPStrings, err := flags.GetStringSlice(\"blacklist-ip\")\n\tif err != nil {\n\t\treturn opts, err\n\t}\n\tfor _, s := range blacklistIPStrings {\n\t\tnet, parseErr := lib.ParseCIDR(s)\n\t\tif parseErr != nil {\n\t\t\treturn opts, fmt.Errorf(\"error parsing blacklist-ip '%s': %w\", s, parseErr)\n\t\t}\n\t\topts.BlacklistIPs = append(opts.BlacklistIPs, net)\n\t}\n\n\tblockedHostnameStrings, err := flags.GetStringSlice(\"block-hostnames\")\n\tif err != nil {\n\t\treturn opts, err\n\t}\n\tif flags.Changed(\"block-hostnames\") {\n\t\topts.BlockedHostnames, err = types.NewNullHostnameTrie(blockedHostnameStrings)\n\t\tif err != nil {\n\t\t\treturn opts, err\n\t\t}\n\t}\n\n\tlocalIpsString, err := flags.GetString(\"local-ips\")\n\tif err != nil {\n\t\treturn opts, err","sourceCodeStart":155,"sourceCodeEnd":191,"githubUrl":"https://github.com/grafana/k6/blob/8d06114777191d21ef885d05c5f8aa9e1ed838ae/internal/cmd/options.go#L155-L191","documentation":"Wrapped error in getOptions while processing --blacklist-ip values: the value s could not be parsed as a CIDR by lib.ParseCIDR. Each blacklist entry must be a valid CIDR block.","triggerScenarios":"Thrown at internal/cmd/options.go:164 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use CIDR notation, e.g. --blacklist-ip 10.0.0.0/8","Fix typos in the offending value shown in the message"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"8d06114777191d21ef885d05c5f8aa9e1ed838ae","analyzedAt":"2026-08-18T03:05:52.393Z","contentChangedAt":"2026-08-18T03:05:52.393Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}