{"record":{"id":"f0cdfef6e822beda","repo":"redis/go-redis","slug":"unexpected-resp3-response-type-t","errorCode":null,"errorMessage":"unexpected RESP3 response type: %T","messagePattern":"unexpected RESP3 response type: %T","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"search_commands.go","lineNumber":1007,"sourceCode":"\nfunc (cmd *AggregateCmd) readReply(rd *proto.Reader) (err error) {\n\treadType, err := rd.PeekReplyType()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t// RESP3 returns a map, RESP2 returns an array\n\tif readType == proto.RespMap {\n\t\t// Read raw response first for backwards compatibility\n\t\tcmd.rawVal, err = rd.ReadReply()\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t// Parse the raw response into structured result\n\t\tif mapVal, ok := cmd.rawVal.(map[interface{}]interface{}); ok {\n\t\t\tcmd.val, err = parseFTAggregateMapRESP3(mapVal)\n\t\t} else {\n\t\t\treturn fmt.Errorf(\"unexpected RESP3 response type: %T\", cmd.rawVal)\n\t\t}\n\t\treturn err\n\t}\n\n\t// RESP2 format or error response - use ReadReply to handle errors properly\n\tdata, err := rd.ReadReply()\n\tif err != nil {\n\t\treturn err\n\t}\n\tcmd.rawVal = data // Store raw value for debugging\n\tif dataSlice, ok := data.([]interface{}); ok {\n\t\tcmd.val, err = ProcessAggregateResult(dataSlice)\n\t\treturn err\n\t}\n\treturn fmt.Errorf(\"unexpected response type: %T\", data)\n}\n\n// parseFTAggregateMapRESP3 parses the RESP3 format response from FT.AGGREGATE.","sourceCodeStart":989,"sourceCodeEnd":1025,"githubUrl":"https://github.com/redis/go-redis/blob/c5cad058c72f58370553b48566302303cf8a2e89/search_commands.go#L989-L1025","documentation":"Error \"unexpected RESP3 response type: %T\" thrown in redis/go-redis.","triggerScenarios":"Thrown at search_commands.go:1007 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"c5cad058c72f58370553b48566302303cf8a2e89","analyzedAt":"2026-09-01T06:50:53.388Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}