go-redis/redis · error
redis: can't parse bool reply: %q
Error message
redis: can't parse bool reply: %q
What it means
Error "redis: can't parse bool reply: %q" thrown in go-redis/redis.
Source
Thrown at internal/proto/reader.go:389
switch v {
case "inf":
return math.Inf(1), nil
case "-inf":
return math.Inf(-1), nil
case "nan", "-nan":
return math.NaN(), nil
}
return strconv.ParseFloat(v, 64)
}
func (r *Reader) readBool(line []byte) (bool, error) {
switch util.BytesToString(line[1:]) {
case "t":
return true, nil
case "f":
return false, nil
}
return false, fmt.Errorf("redis: can't parse bool reply: %q", line)
}
func (r *Reader) readBigInt(line []byte) (*big.Int, error) {
i := new(big.Int)
if i, ok := i.SetString(util.BytesToString(line[1:]), 10); ok {
return i, nil
}
return nil, fmt.Errorf("redis: can't parse bigInt reply: %q", line)
}
func (r *Reader) readStringReply(line []byte) (string, error) {
n, err := replyLen(line)
if err != nil {
return "", err
}
b := make([]byte, n+2)
_, err = io.ReadFull(r.rd, b)View on GitHub (pinned to 36d97525cd)
Solutions
- Ensure the server returns a boolean frame ('#t'/'#f') for this command; reconnect if stream is desynced
- Check proxies that may rewrite RESP3 booleans
When it happens
Trigger: Thrown at internal/proto/reader.go:389 when the library encounters an invalid state.
Common situations: Disable RESP3 (Protocol: 2) when behind proxies that mangle boolean frames.
AI-assisted analysis of go-redis/redis@36d97525cd (2026-08-06).
Data as JSON: /data/errors/24d57e87cbb3a96e.json.
Report an issue: GitHub.