{"record":{"id":"e45e00aa6c2042a2","repo":"grafana/k6","slug":"metric-tags-w","errorCode":null,"errorMessage":"metric tags: %w","messagePattern":"metric tags: %w","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/js/modules/k6/grpc/params.go","lineNumber":53,"sourceCode":"\tif common.IsNullish(input) {\n\t\treturn result, nil\n\t}\n\n\trt := vu.Runtime()\n\tparams := input.ToObject(rt)\n\n\tfor _, k := range params.Keys() {\n\t\tswitch k {\n\t\tcase \"metadata\":\n\t\t\tmd, err := newMetadata(params.Get(k))\n\t\t\tif err != nil {\n\t\t\t\treturn result, fmt.Errorf(\"invalid metadata param: %w\", err)\n\t\t\t}\n\n\t\t\tresult.Metadata = md\n\t\tcase \"tags\":\n\t\t\tif err := common.ApplyCustomUserTags(rt, &result.TagsAndMeta, params.Get(k)); err != nil {\n\t\t\t\treturn result, fmt.Errorf(\"metric tags: %w\", err)\n\t\t\t}\n\t\tcase \"timeout\":\n\t\t\tvar err error\n\t\t\tv := params.Get(k).Export()\n\t\t\tresult.Timeout, err = types.GetDurationValue(v)\n\t\t\tif err != nil {\n\t\t\t\treturn result, fmt.Errorf(\"invalid timeout value: %w\", err)\n\t\t\t}\n\t\tcase \"discardResponseMessage\":\n\t\t\tresult.DiscardResponseMessage = params.Get(k).ToBoolean()\n\t\tdefault:\n\t\t\treturn result, fmt.Errorf(\"unknown param: %q\", k)\n\t\t}\n\t}\n\n\treturn result, nil\n}\n","sourceCodeStart":35,"sourceCodeEnd":71,"githubUrl":"https://github.com/grafana/k6/blob/01ffac6f245854c1b8adc6a69857c76a15f90022/internal/js/modules/k6/grpc/params.go#L35-L71","documentation":"Raised in newCallParams when ApplyCustomUserTags fails on the 'tags' key of the params object — tags must be a plain object of string keys to string values; the wrapped error names the problem.","triggerScenarios":"Thrown at internal/js/modules/k6/grpc/params.go:53 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass tags as a plain object like {tags: {env: 'staging'}}","Ensure all tag values are strings","Check the wrapped error for the offending tag entry"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"01ffac6f245854c1b8adc6a69857c76a15f90022","analyzedAt":"2026-08-18T03:05:52.393Z","contentChangedAt":"2026-08-18T03:05:52.393Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}