{"record":{"id":"7ca29c9ba4d5b5f7","repo":"grafana/k6","slug":"invalid-reflect-value-v-it-needs-to-be-boole","errorCode":null,"errorMessage":"invalid reflect value: '%#v', it needs to be boolean","messagePattern":"invalid reflect value: '%#v', it needs to be boolean","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/js/modules/k6/grpc/params.go","lineNumber":175,"sourceCode":"\n\t\tswitch k {\n\t\tcase \"plaintext\":\n\t\t\tvar ok bool\n\t\t\tresult.IsPlaintext, ok = v.(bool)\n\t\t\tif !ok {\n\t\t\t\treturn result, fmt.Errorf(\"invalid plaintext value: '%#v', it needs to be boolean\", v)\n\t\t\t}\n\t\tcase \"timeout\":\n\t\t\tvar err error\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 \"reflect\":\n\t\t\tvar ok bool\n\t\t\tresult.UseReflectionProtocol, ok = v.(bool)\n\t\t\tif !ok {\n\t\t\t\treturn result, fmt.Errorf(\"invalid reflect value: '%#v', it needs to be boolean\", v)\n\t\t\t}\n\t\tcase \"reflectMetadata\":\n\t\t\tmd, err := newMetadata(params.Get(k))\n\t\t\tif err != nil {\n\t\t\t\treturn result, fmt.Errorf(\"invalid reflectMetadata param: %w\", err)\n\t\t\t}\n\n\t\t\tresult.ReflectionMetadata = md\n\t\tcase \"maxReceiveSize\":\n\t\t\tvar ok bool\n\t\t\tresult.MaxReceiveSize, ok = v.(int64)\n\t\t\tif !ok {\n\t\t\t\treturn result, fmt.Errorf(\"invalid maxReceiveSize value: '%#v', it needs to be an integer\", v)\n\t\t\t}\n\t\t\tif result.MaxReceiveSize < 0 {\n\t\t\t\treturn result, fmt.Errorf(\"invalid maxReceiveSize value: '%#v, it needs to be a positive integer\", v)\n\t\t\t}\n\t\tcase \"maxSendSize\":","sourceCodeStart":157,"sourceCodeEnd":193,"githubUrl":"https://github.com/grafana/k6/blob/01ffac6f245854c1b8adc6a69857c76a15f90022/internal/js/modules/k6/grpc/params.go#L157-L193","documentation":"Raised in newConnectParams when the 'reflect' option of grpc.connect (enabling server reflection) does not export as a Go bool — a non-boolean value such as a string or number was supplied.","triggerScenarios":"Thrown at internal/js/modules/k6/grpc/params.go:175 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass a real boolean: {reflect: true}","Avoid truthy non-boolean values like 'true' or 1"],"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"}