{"id":"29c8967fe9accfe6","repo":"go-redis/redis","slug":"invalid-execution-time-format-v","errorCode":null,"errorMessage":"invalid execution_time format: %v","messagePattern":"invalid execution_time format: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"search_commands.go","lineNumber":3137,"sourceCode":"\t}\n\tif ok {\n\t\twarnings = make([]string, 0, len(warningsData))\n\t\tfor _, w := range warningsData {\n\t\t\tif ws, ok := w.(string); ok {\n\t\t\t\twarnings = append(warnings, ws)\n\t\t\t}\n\t\t}\n\t}\n\n\t// Parse execution time (optional field)\n\tvar executionTime float64\n\tif execTimeVal, exists := resultMap[\"execution_time\"]; exists {\n\t\tswitch v := execTimeVal.(type) {\n\t\tcase string:\n\t\t\tvar err error\n\t\t\texecutionTime, err = strconv.ParseFloat(v, 64)\n\t\t\tif err != nil {\n\t\t\t\treturn FTHybridResult{}, nil, fmt.Errorf(\"invalid execution_time format: %v\", err)\n\t\t\t}\n\t\tcase float64:\n\t\t\texecutionTime = v\n\t\tcase int64:\n\t\t\texecutionTime = float64(v)\n\t\t}\n\t}\n\n\treturn FTHybridResult{\n\t\tTotalResults:  int(totalResults),\n\t\tResults:       results,\n\t\tWarnings:      warnings,\n\t\tExecutionTime: executionTime,\n\t}, nil, nil\n}\n\nfunc (cmd *FTHybridCmd) readReply(rd *proto.Reader) (err error) {\n\tdata, err := rd.ReadSlice()","sourceCodeStart":3119,"sourceCodeEnd":3155,"githubUrl":"https://github.com/go-redis/redis/blob/36d97525cd8076aed67cddf54778e9ea84550929/search_commands.go#L3119-L3155","documentation":"Thrown in parseFTHybrid (search_commands.go:3131-3138): the optional 'execution_time' field, when present as a string, must be parseable by strconv.ParseFloat. A non-numeric string here trips this error, with the underlying ParseFloat error appended.","triggerScenarios":"FHybrid reply where execution_time is a string like 'N/A', 'inf', or empty, so ParseFloat fails.","commonSituations":"Older/newer module variant formatting execution_time differently, locale-specific decimal separators, or a proxy mangling the value.","solutions":["Inspect RawResult() for the execution_time value.","Upgrade the server module to a version emitting parseable floats.","File a go-redis issue if a legitimate format is rejected.","Filter execution_time at the query level if not needed."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"res, _, err := client.FTHybridWithArgs(ctx, idx, opts).Result()\nif err != nil && strings.Contains(err.Error(), \"invalid execution_time format\") {\n    raw, _ := cmd.RawVal()\n    log.Printf(\"fthybrid execution_time unparseable; raw=%#v\", raw)\n}","preventionTips":["Upgrade the server module so execution_time is numeric.","Inspect RawVal() for the execution_time value.","File a go-redis issue if a legitimate format is rejected."],"tags":["redisearch","ft-hybrid","strconv","response-parsing"],"analyzedSha":"36d97525cd8076aed67cddf54778e9ea84550929","analyzedAt":"2026-08-06T01:08:27.376Z","schemaVersion":2}