router-for-me/CLIProxyAPI · error
ERR
ERR
Error message
protocol error
What it means
Error "protocol error" thrown in router-for-me/CLIProxyAPI.
Source
Thrown at internal/api/redis_queue_protocol.go:419
return 0, false, false
}
if len(args) == 2 {
return 1, false, true
}
parsed, errParse := strconv.Atoi(strings.TrimSpace(args[2]))
if errParse != nil {
return 0, true, true
}
return parsed, true, true
}
func readRESPArray(reader *bufio.Reader) ([]string, error) {
prefix, errRead := reader.ReadByte()
if errRead != nil {
return nil, errRead
}
if prefix != '*' {
return nil, fmt.Errorf("protocol error")
}
line, errLine := readRESPLine(reader)
if errLine != nil {
return nil, errLine
}
count, errParse := strconv.Atoi(line)
if errParse != nil || count < 0 {
return nil, fmt.Errorf("protocol error")
}
args := make([]string, 0, count)
for i := 0; i < count; i++ {
value, errString := readRESPString(reader)
if errString != nil {
return nil, errString
}
args = append(args, value)
}
return args, nilView on GitHub (pinned to 78f0c4079e)
Solutions
- Verify the client speaks the expected redis queue protocol version and message framing.
- Check for corrupted or truncated messages on the queue connection and reconnect if needed.
When it happens
Trigger: Thrown at internal/api/redis_queue_protocol.go:419 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of router-for-me/CLIProxyAPI@78f0c4079e (2026-08-15).
Data as JSON: /api/errors/d1f04532690124c3.
Report an issue: GitHub.