{"record":{"id":"e45c1c9616b2cc84","repo":"grafana/k6","slug":"unknown-tls-version-s","errorCode":null,"errorMessage":"unknown TLS version '%s'","messagePattern":"unknown TLS version '(.+?)'","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"lib/options.go","lineNumber":50,"sourceCode":"\n// MarshalJSON implements the json.Marshaler interface\nfunc (v TLSVersion) MarshalJSON() ([]byte, error) {\n\treturn []byte(`\"` + SupportedTLSVersionsToString[v] + `\"`), nil\n}\n\n// UnmarshalJSON implements the json.Unmarshaler interface\nfunc (v *TLSVersion) UnmarshalJSON(data []byte) error {\n\tvar str string\n\tif err := StrictJSONUnmarshal(data, &str); err != nil {\n\t\treturn err\n\t}\n\tif str == \"\" {\n\t\t*v = 0\n\t\treturn nil\n\t}\n\tver, ok := SupportedTLSVersions[str]\n\tif !ok {\n\t\treturn fmt.Errorf(\"unknown TLS version '%s'\", str)\n\t}\n\t*v = ver\n\treturn nil\n}\n\n// Fields for TLSVersions. Unmarshalling hack.\ntype tlsVersionsFields struct {\n\tMin TLSVersion `json:\"min\" ignored:\"true\"` // Minimum allowed version, 0 = any.\n\tMax TLSVersion `json:\"max\" ignored:\"true\"` // Maximum allowed version, 0 = any.\n}\n\n// TLSVersions describes a set (min/max) of TLS versions.\ntype TLSVersions tlsVersionsFields\n\n// UnmarshalJSON implements the json.Unmarshaler interface\nfunc (v *TLSVersions) UnmarshalJSON(data []byte) error {\n\tvar fields tlsVersionsFields\n\tif err := StrictJSONUnmarshal(data, &fields); err != nil {","sourceCodeStart":32,"sourceCodeEnd":68,"githubUrl":"https://github.com/grafana/k6/blob/01ffac6f245854c1b8adc6a69857c76a15f90022/lib/options.go#L32-L68","documentation":"Raised by TLSVersion.UnmarshalJSON while parsing the tlsVersion option: the given version string is not a key in the SupportedTLSVersions map (e.g. a typo or unsupported TLS version name).","triggerScenarios":"Thrown at lib/options.go:50 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use supported names such as tls1, tls1.1, tls1.2, tls1.3","Check for typos in the sslAlpnProtocols/tlsVersion configuration"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"01ffac6f245854c1b8adc6a69857c76a15f90022","analyzedAt":"2026-08-18T03:05:52.393Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}