{"record":{"id":"972f4ad1fa916d9d","repo":"probelabs/goreplay","slug":"expected-key-value","errorCode":null,"errorMessage":"Expected `Key: Value`","messagePattern":"Expected `Key: Value`","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"http_modifier_settings.go","lineNumber":143,"sourceCode":"\n// Handling of --http-set-header option\ntype httpHeader struct {\n\tName  string\n\tValue string\n}\n\n// HTTPHeaders is a slice of headers that must appended\ntype HTTPHeaders []httpHeader\n\nfunc (h *HTTPHeaders) String() string {\n\treturn fmt.Sprint(*h)\n}\n\n// Set method to implement flags.Value\nfunc (h *HTTPHeaders) Set(value string) error {\n\tv := strings.SplitN(value, \":\", 2)\n\tif len(v) != 2 {\n\t\treturn errors.New(\"Expected `Key: Value`\")\n\t}\n\n\theader := httpHeader{\n\t\tstrings.TrimSpace(v[0]),\n\t\tstrings.TrimSpace(v[1]),\n\t}\n\n\t*h = append(*h, header)\n\treturn nil\n}\n\n// Handling of --http-set-param option\ntype httpParam struct {\n\tName  []byte\n\tValue []byte\n}\n\n// HTTPParams filters for --http-set-param","sourceCodeStart":125,"sourceCodeEnd":161,"githubUrl":"https://github.com/probelabs/goreplay/blob/251e45abd242886bb64ff2b2dc98789556b56330/http_modifier_settings.go#L125-L161","documentation":"Flag-value validation error raised by HTTPHeaders.Set (used by --http-set-header) when the argument cannot be split into exactly two colon-separated parts, so no header name/value pair can be appended.","triggerScenarios":"Thrown at http_modifier_settings.go:143 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Format the flag as 'Header: Value', e.g. --http-set-header 'X-Forwarded-For: 1.2.3.4'","Remember only the first colon splits the pair; values may contain further colons","Check shell quoting so the whole pair is one argument"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"251e45abd242886bb64ff2b2dc98789556b56330","analyzedAt":"2026-09-02T16:44:11.369Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-09T21:17:11.164Z"}