go-redis/redis · error
redis: can't parse verbatim string reply: %q
Error message
redis: can't parse verbatim string reply: %q
What it means
Error "redis: can't parse verbatim string reply: %q" thrown in go-redis/redis.
Source
Thrown at internal/proto/reader.go:421
return "", err
}
b := make([]byte, n+2)
_, err = io.ReadFull(r.rd, b)
if err != nil {
return "", err
}
return util.BytesToString(b[:n]), nil
}
func (r *Reader) readVerb(line []byte) (string, error) {
s, err := r.readStringReply(line)
if err != nil {
return "", err
}
if len(s) < 4 || s[3] != ':' {
return "", fmt.Errorf("redis: can't parse verbatim string reply: %q", line)
}
return s[4:], nil
}
func (r *Reader) readSlice(line []byte) ([]interface{}, error) {
n, err := replyLen(line)
if err != nil {
return nil, err
}
val := make([]interface{}, n)
for i := 0; i < len(val); i++ {
v, err := r.ReadReply()
if err != nil {
if err == Nil {
val[i] = nil
continue
}View on GitHub (pinned to 36d97525cd)
Solutions
- Check the quoted verbatim string; the format prefix may be unsupported
- Reconnect to resynchronize the stream
When it happens
Trigger: Thrown at internal/proto/reader.go:421 when the library encounters an invalid state.
Common situations: Strictly validate the verbatim format field and drop the conn on unknown formats.
AI-assisted analysis of go-redis/redis@36d97525cd (2026-08-06).
Data as JSON: /data/errors/51f90e919307c54e.json.
Report an issue: GitHub.