{"id":"353bf3907b486edf","repo":"go-redis/redis","slug":"redis-cms-info-unexpected-key-s","errorCode":null,"errorMessage":"redis: CMS.INFO unexpected key %s","messagePattern":"redis: CMS\\.INFO unexpected key (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"probabilistic.go","lineNumber":871,"sourceCode":"\t}\n\n\tvar key string\n\tvar result CMSInfo\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 \"width\":\n\t\t\tresult.Width, err = rd.ReadInt()\n\t\tcase \"depth\":\n\t\t\tresult.Depth, err = rd.ReadInt()\n\t\tcase \"count\":\n\t\t\tresult.Count, err = rd.ReadInt()\n\t\tdefault:\n\t\t\treturn fmt.Errorf(\"redis: CMS.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 *CMSInfoCmd) Clone() Cmder {\n\treturn &CMSInfoCmd{\n\t\tbaseCmd: cmd.cloneBaseCmd(),\n\t\tval:     cmd.val, // CMSInfo is a simple struct, can be copied directly\n\t}\n}\n","sourceCodeStart":853,"sourceCodeEnd":889,"githubUrl":"https://github.com/go-redis/redis/blob/36d97525cd8076aed67cddf54778e9ea84550929/probabilistic.go#L853-L889","documentation":"Error \"redis: CMS.INFO unexpected key %s\" thrown in go-redis/redis.","triggerScenarios":"Thrown at probabilistic.go:871 when the library encounters an invalid state.","commonSituations":"Tolerate unknown keys in module info replies.","solutions":["Extend CMS.INFO parsing for the unexpected key in the error","Check module version compatibility"],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"analyzedSha":"36d97525cd8076aed67cddf54778e9ea84550929","analyzedAt":"2026-08-06T01:08:27.376Z","schemaVersion":2}