{"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":395,"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":377,"sourceCodeEnd":413,"githubUrl":"https://github.com/grafana/k6/blob/01ffac6f245854c1b8adc6a69857c76a15f90022/js/modules/k6/http/request.go#L377-L413","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":"01ffac6f245854c1b8adc6a69857c76a15f90022","analyzedAt":"2026-08-18T03:05:52.393Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}