{"id":"ad0a204a1c7a0684","repo":"go-redis/redis","slug":"redis-can-t-read-raw-reply-100q","errorCode":null,"errorMessage":"redis: can't read raw reply: %.100q","messagePattern":"redis: can't read raw reply: %\\.100q","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/proto/reader.go","lineNumber":954,"sourceCode":"\t\t\t}\n\t\t\treturn buf, err\n\t\t}\n\t\t// Read the attribute key-value pairs. Iterate over pairs rather than\n\t\t// n*2 elements so a count above MaxInt/2 can't overflow int to a\n\t\t// negative loop bound and skip the body.\n\t\tfor i := 0; i < n; i++ {\n\t\t\tfor pair := 0; pair < 2; pair++ {\n\t\t\t\tbuf, err = r.readRawReplyBuf(buf)\n\t\t\t\tif err != nil {\n\t\t\t\t\treturn buf, err\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// Read the command reply that follows the attribute\n\t\treturn r.readRawReplyBuf(buf)\n\t}\n\n\treturn buf, fmt.Errorf(\"redis: can't read raw reply: %.100q\", line)\n}\n\nvar crlf = []byte{'\\r', '\\n'}\n\n// ReadRawReplyWriteTo streams the next RESP reply directly to w without intermediate allocations.\n// Returns the number of bytes written and any error encountered.\nfunc (r *Reader) ReadRawReplyWriteTo(w io.Writer) (int64, error) {\n\treturn r.readRawReplyWriteTo(w)\n}\n\nfunc (r *Reader) readRawReplyWriteTo(w io.Writer) (int64, error) {\n\tline, err := r.readLine()\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\n\tvar written int64\n\tn, err := w.Write(line)","sourceCodeStart":936,"sourceCodeEnd":972,"githubUrl":"https://github.com/go-redis/redis/blob/36d97525cd8076aed67cddf54778e9ea84550929/internal/proto/reader.go#L936-L972","documentation":"Error \"redis: can't read raw reply: %.100q\" thrown in go-redis/redis.","triggerScenarios":"Thrown at internal/proto/reader.go:954 when the library encounters an invalid state.","commonSituations":"Limit raw reads to commands known to need them and validate frame headers first.","solutions":["Inspect the quoted reply; raw frame reading failed on malformed data","Reconnect and retry the command"],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"analyzedSha":"36d97525cd8076aed67cddf54778e9ea84550929","analyzedAt":"2026-08-06T01:08:27.376Z","schemaVersion":2}