{"record":{"id":"e3a9b643b1c07fa2","repo":"redis/go-redis","slug":"redis-filter-by-value-requires-exactly-2-elements","errorCode":null,"errorMessage":"redis: FILTER_BY_VALUE requires exactly 2 elements [min, max], got %d","messagePattern":"redis: FILTER_BY_VALUE requires exactly 2 elements \\[min, max\\], got (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"timeseries_commands.go","lineNumber":1428,"sourceCode":"\tcount int,\n\talign interface{},\n\taggregators [][]Aggregator,\n\tbucketDuration int,\n\tbucketTimestamp interface{},\n\tempty bool,\n) ([]interface{}, error) {\n\tif latest {\n\t\targs = append(args, \"LATEST\")\n\t}\n\tif len(filterByTS) > 0 {\n\t\targs = append(args, \"FILTER_BY_TS\")\n\t\tfor _, ts := range filterByTS {\n\t\t\targs = append(args, ts)\n\t\t}\n\t}\n\tif len(filterByValue) > 0 {\n\t\tif len(filterByValue) != 2 {\n\t\t\treturn args, fmt.Errorf(\"redis: FILTER_BY_VALUE requires exactly 2 elements [min, max], got %d\", len(filterByValue))\n\t\t}\n\t\targs = append(args, \"FILTER_BY_VALUE\", filterByValue[0], filterByValue[1])\n\t}\n\tif count != 0 {\n\t\targs = append(args, \"COUNT\", count)\n\t}\n\tif align != nil {\n\t\targs = append(args, \"ALIGN\", align)\n\t}\n\tif len(aggregators) > 0 {\n\t\taggParts, err := buildNRangeAggregationArgs(keys, aggregators)\n\t\tif err != nil {\n\t\t\treturn args, err\n\t\t}\n\t\targs = append(args, \"AGGREGATION\")\n\t\tfor _, a := range aggParts {\n\t\t\targs = append(args, a)\n\t\t}","sourceCodeStart":1410,"sourceCodeEnd":1446,"githubUrl":"https://github.com/redis/go-redis/blob/c5cad058c72f58370553b48566302303cf8a2e89/timeseries_commands.go#L1410-L1446","documentation":"Error \"redis: FILTER_BY_VALUE requires exactly 2 elements [min, max], got %d\" thrown in redis/go-redis.","triggerScenarios":"Thrown at timeseries_commands.go:1428 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"}