{"id":"49290f01779d207d","repo":"go-redis/redis","slug":"redis-can-t-parse-reply-100q-reading-string","errorCode":null,"errorMessage":"redis: can't parse reply=%.100q reading string","messagePattern":"redis: can't parse reply=%\\.100q reading string","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/proto/reader.go","lineNumber":690,"sourceCode":"\n\tswitch line[0] {\n\tcase RespStatus, RespInt, RespFloat:\n\t\treturn string(line[1:]), nil\n\tcase RespString:\n\t\treturn r.readStringReply(line)\n\tcase RespBool:\n\t\tb, err := r.readBool(line)\n\t\treturn strconv.FormatBool(b), err\n\tcase RespVerbatim:\n\t\treturn r.readVerb(line)\n\tcase RespBigInt:\n\t\tb, err := r.readBigInt(line)\n\t\tif err != nil {\n\t\t\treturn \"\", err\n\t\t}\n\t\treturn b.String(), nil\n\t}\n\treturn \"\", fmt.Errorf(\"redis: can't parse reply=%.100q reading string\", line)\n}\n\nfunc (r *Reader) ReadBool() (bool, error) {\n\ts, err := r.ReadString()\n\tif err != nil {\n\t\treturn false, err\n\t}\n\treturn s == \"OK\" || s == \"1\" || s == \"true\", nil\n}\n\nfunc (r *Reader) ReadSlice() ([]interface{}, error) {\n\tline, err := r.ReadLine()\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn r.readSlice(line)\n}\n","sourceCodeStart":672,"sourceCodeEnd":708,"githubUrl":"https://github.com/go-redis/redis/blob/36d97525cd8076aed67cddf54778e9ea84550929/internal/proto/reader.go#L672-L708","documentation":"Error \"redis: can't parse reply=%.100q reading string\" thrown in go-redis/redis.","triggerScenarios":"Thrown at internal/proto/reader.go:690 when the library encounters an invalid state.","commonSituations":"Match the Cmder type to the command's actual reply type.","solutions":["Inspect the truncated reply in the error for the actual bytes","Ensure the command returns a string type (use the correct cmd type)"],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"analyzedSha":"36d97525cd8076aed67cddf54778e9ea84550929","analyzedAt":"2026-08-06T01:08:27.376Z","schemaVersion":2}