{"id":"580636f51ea8426a","repo":"go-redis/redis","slug":"redis-topk-info-unexpected-key-s","errorCode":null,"errorMessage":"redis: topk.info unexpected key %s","messagePattern":"redis: topk\\.info unexpected key (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"probabilistic.go","lineNumber":1077,"sourceCode":"\tvar key string\n\tvar result TopKInfo\n\tfor f := 0; f < n; f++ {\n\t\tkey, err = rd.ReadString()\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tswitch key {\n\t\tcase \"k\":\n\t\t\tresult.K, err = rd.ReadInt()\n\t\tcase \"width\":\n\t\t\tresult.Width, err = rd.ReadInt()\n\t\tcase \"depth\":\n\t\t\tresult.Depth, err = rd.ReadInt()\n\t\tcase \"decay\":\n\t\t\tresult.Decay, err = rd.ReadFloat()\n\t\tdefault:\n\t\t\treturn fmt.Errorf(\"redis: topk.info unexpected key %s\", key)\n\t\t}\n\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\tcmd.val = result\n\treturn nil\n}\n\nfunc (cmd *TopKInfoCmd) Clone() Cmder {\n\treturn &TopKInfoCmd{\n\t\tbaseCmd: cmd.cloneBaseCmd(),\n\t\tval:     cmd.val, // TopKInfo is a simple struct, can be copied directly\n\t}\n}\n","sourceCodeStart":1059,"sourceCodeEnd":1095,"githubUrl":"https://github.com/go-redis/redis/blob/36d97525cd8076aed67cddf54778e9ea84550929/probabilistic.go#L1059-L1095","documentation":"Error \"redis: topk.info unexpected key %s\" thrown in go-redis/redis.","triggerScenarios":"Thrown at probabilistic.go:1077 when the library encounters an invalid state.","commonSituations":"Ignore unknown info keys or pin module versions.","solutions":["Extend TOPK.INFO parsing for the unexpected key","Verify the RedisBloom version"],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"analyzedSha":"36d97525cd8076aed67cddf54778e9ea84550929","analyzedAt":"2026-08-06T01:08:27.376Z","schemaVersion":2}