{"record":{"id":"e51c925784f22197","repo":"grafana/k6","slug":"invalid-http-request-metric-tags-w","errorCode":null,"errorMessage":"invalid HTTP request metric tags: %w","messagePattern":"invalid HTTP request metric tags: %w","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"js/modules/k6/http/request.go","lineNumber":394,"sourceCode":"\t\t\t\tif algosString == \"\" {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\talgos := strings.Split(algosString, \",\")\n\t\t\t\tvar err error\n\t\t\t\tresult.Compressions = make([]httpext.CompressionType, len(algos))\n\t\t\t\tfor index, algo := range algos {\n\t\t\t\t\talgo = strings.TrimSpace(algo)\n\t\t\t\t\tresult.Compressions[index], err = httpext.CompressionTypeString(algo)\n\t\t\t\t\tif err != nil {\n\t\t\t\t\t\treturn nil, fmt.Errorf(\"unknown compression algorithm %s, supported algorithms are %s\",\n\t\t\t\t\t\t\talgo, httpext.CompressionTypeValues())\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\tcase \"redirects\":\n\t\t\t\tresult.Redirects = null.IntFrom(params.Get(k).ToInteger())\n\t\t\tcase \"tags\":\n\t\t\t\tif err := common.ApplyCustomUserTags(rt, &result.TagsAndMeta, params.Get(k)); err != nil {\n\t\t\t\t\treturn nil, fmt.Errorf(\"invalid HTTP request metric tags: %w\", err)\n\t\t\t\t}\n\t\t\tcase \"auth\":\n\t\t\t\tresult.Auth = params.Get(k).String()\n\t\t\tcase \"timeout\":\n\t\t\t\tt, err := types.GetDurationValue(params.Get(k).Export())\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, fmt.Errorf(\"invalid timeout value: %w\", err)\n\t\t\t\t}\n\t\t\t\tresult.Timeout = t\n\t\t\tcase \"throw\":\n\t\t\t\tresult.Throw = params.Get(k).ToBoolean()\n\t\t\tcase \"responseType\":\n\t\t\t\tresponseType, err := httpext.ResponseTypeString(params.Get(k).String())\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn nil, err\n\t\t\t\t}\n\t\t\t\tresult.ResponseType = responseType\n\t\t\tcase \"responseCallback\":","sourceCodeStart":376,"sourceCodeEnd":412,"githubUrl":"https://github.com/grafana/k6/blob/8d06114777191d21ef885d05c5f8aa9e1ed838ae/js/modules/k6/http/request.go#L376-L412","documentation":"In parseRequest, the tags parameter of an http request is applied through common.ApplyCustomUserTags; failure there (invalid tag shape, non-string values, bad object) is wrapped with this message. The per-request metric tags supplied in the params object are invalid.","triggerScenarios":"Thrown at js/modules/k6/http/request.go:395 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use only string, boolean or number values in the tags option","Convert objects/arrays to strings before using them as tags"],"exampleFix":null,"handlingStrategy":"type-guard","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"}