{"id":"24d57e87cbb3a96e","repo":"go-redis/redis","slug":"redis-can-t-parse-bool-reply-q","errorCode":null,"errorMessage":"redis: can't parse bool reply: %q","messagePattern":"redis: can't parse bool reply: %q","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/proto/reader.go","lineNumber":389,"sourceCode":"\tswitch v {\n\tcase \"inf\":\n\t\treturn math.Inf(1), nil\n\tcase \"-inf\":\n\t\treturn math.Inf(-1), nil\n\tcase \"nan\", \"-nan\":\n\t\treturn math.NaN(), nil\n\t}\n\treturn strconv.ParseFloat(v, 64)\n}\n\nfunc (r *Reader) readBool(line []byte) (bool, error) {\n\tswitch util.BytesToString(line[1:]) {\n\tcase \"t\":\n\t\treturn true, nil\n\tcase \"f\":\n\t\treturn false, nil\n\t}\n\treturn false, fmt.Errorf(\"redis: can't parse bool reply: %q\", line)\n}\n\nfunc (r *Reader) readBigInt(line []byte) (*big.Int, error) {\n\ti := new(big.Int)\n\tif i, ok := i.SetString(util.BytesToString(line[1:]), 10); ok {\n\t\treturn i, nil\n\t}\n\treturn nil, fmt.Errorf(\"redis: can't parse bigInt reply: %q\", line)\n}\n\nfunc (r *Reader) readStringReply(line []byte) (string, error) {\n\tn, err := replyLen(line)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\tb := make([]byte, n+2)\n\t_, err = io.ReadFull(r.rd, b)","sourceCodeStart":371,"sourceCodeEnd":407,"githubUrl":"https://github.com/go-redis/redis/blob/36d97525cd8076aed67cddf54778e9ea84550929/internal/proto/reader.go#L371-L407","documentation":"Error \"redis: can't parse bool reply: %q\" thrown in go-redis/redis.","triggerScenarios":"Thrown at internal/proto/reader.go:389 when the library encounters an invalid state.","commonSituations":"Disable RESP3 (Protocol: 2) when behind proxies that mangle boolean frames.","solutions":["Ensure the server returns a boolean frame ('#t'/'#f') for this command; reconnect if stream is desynced","Check proxies that may rewrite RESP3 booleans"],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"analyzedSha":"36d97525cd8076aed67cddf54778e9ea84550929","analyzedAt":"2026-08-06T01:08:27.376Z","schemaVersion":2}