Skip to content

Commit be85bca

Browse files
authored
Merge branch 'main' into feature/redis-proxy
2 parents 74e0f44 + f3c2b28 commit be85bca

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

adapter/redis.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -552,7 +552,9 @@ func parseRedisSetTTL(args [][]byte, index int, opt string, now time.Time) (*tim
552552
}
553553
n, err := strconv.ParseInt(string(args[index+1]), 10, 64)
554554
if err != nil {
555-
return nil, index, errors.WithStack(err)
555+
// Match Redis behavior: invalid numeric TTL value should not expose
556+
// internal parsing errors, but return a stable protocol error.
557+
return nil, index, errors.New("ERR value is not an integer or out of range")
556558
}
557559
if n <= 0 {
558560
return nil, index, errors.New("ERR invalid expire time in 'set' command")

0 commit comments

Comments
 (0)