{"record":{"id":"4cdcf07028e1791b","repo":"redis/go-redis","slug":"unexpected-response-type-t","errorCode":null,"errorMessage":"unexpected response type: %T","messagePattern":"unexpected response type: %T","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"search_commands.go","lineNumber":1022,"sourceCode":"\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.\n// It takes a map[interface{}]interface{} which is the raw response from ReadReply().\n// RESP3 format:\n//\n//\t%5\n//\t  $10 attributes => *0\n//\t  $13 total_results => :N\n//\t  $6 format => $6 STRING\n//\t  $7 results => *N (array of maps with extra_attributes, values)\n//\t  $7 warning => *N (array of strings)\nfunc parseFTAggregateMapRESP3(data map[interface{}]interface{}) (*FTAggregateResult, error) {\n\tresult := &FTAggregateResult{\n\t\tRows: make([]AggregateRow, 0),\n\t}\n\n\tfor k, v := range data {","sourceCodeStart":1004,"sourceCodeEnd":1040,"githubUrl":"https://github.com/redis/go-redis/blob/c5cad058c72f58370553b48566302303cf8a2e89/search_commands.go#L1004-L1040","documentation":"Error \"unexpected response type: %T\" thrown in redis/go-redis.","triggerScenarios":"Thrown at search_commands.go:1022 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"}