router-for-me/CLIProxyAPI · error
%s
Error message
%s
What it means
This is the RESP error-line branch of readRESPBulk in internal/home/certificate.go: the reply began with '-' (RESP error), so the raw error line from the home/Redis server is surfaced verbatim as the error message. It is a pass-through of the server's own error text (e.g. ERR unknown command, WRONGPASS, NOAUTH).
Source
Thrown at internal/home/certificate.go:378
}
size, errSize := strconv.Atoi(strings.TrimSpace(line))
if errSize != nil {
return nil, errSize
}
if size < 0 {
return nil, fmt.Errorf("home certificate request returned nil")
}
payload := make([]byte, size+2)
if _, errFull := io.ReadFull(reader, payload); errFull != nil {
return nil, errFull
}
return payload[:size], nil
case '-':
line, errLine := reader.ReadString('\n')
if errLine != nil {
return nil, errLine
}
return nil, fmt.Errorf("%s", strings.TrimSpace(line))
default:
return nil, fmt.Errorf("home certificate request returned unsupported resp prefix %q", prefix)
}
}
func fileExists(path string) bool {
info, errStat := os.Stat(path)
return errStat == nil && !info.IsDir()
}
View on GitHub (pinned to 78f0c4079e)
Solutions
- Read the surfaced server message — it names the exact server-side problem (NOAUTH => set password; ERR unknown command 'CERTIFICATE' => wrong server type; WRONGPASS => fix credentials)
- Point the home client at the actual home/Redis-compatible endpoint that implements the enrollment commands
- If MOVED/ASK appears, connect to the redirected node or use a non-cluster address
Defensive patterns
Strategy: try-catch
Try / catch
if err != nil {
msg := err.Error()
switch {
case strings.Contains(msg, "NOAUTH"), strings.Contains(msg, "WRONGPASS"):
return fmt.Errorf("home auth failed — check password config: %s", msg)
case strings.Contains(msg, "unknown command"):
return fmt.Errorf("endpoint is not a home server: %s", msg)
case strings.Contains(msg, "MOVED"), strings.Contains(msg, "ASK"):
return fmt.Errorf("cluster redirect — connect to the redirected node: %s", msg)
}
} Prevention
- Smoke-test the endpoint with redis-cli PING before enabling the feature
- Keep home credentials in the same secret-management flow as other service credentials
When it happens
Trigger: Any server-side RESP error during the certificate exchange: unknown command sent to a non-home Redis, auth failure (NOAUTH/WRONGPASS), cluster MOVED/ASK redirections surfaced as errors, or an enrollment-domain error string produced by the home server.
Common situations: Client pointed at a stock Redis that does not implement CERTIFICATE; Redis requires AUTH but credentials missing/wrong in config; Redis in cluster mode returning MOVED because the home server expects direct-to-slot access.
Related errors
- home certificate request returned nil
- home certificate request returned unsupported resp prefix %q
- home certificate request failed
- home: invalid address (host=%q port=%d)
- home ca fingerprint is required
AI-assisted analysis of router-for-me/CLIProxyAPI@78f0c4079e (2026-08-15).
Data as JSON: /api/errors/9b05e53066cb323e.
Report an issue: GitHub.