{"id":"df4d5989fbaf8399","repo":"go-redis/redis","slug":"redis-can-t-parse-map-reply-100q","errorCode":null,"errorMessage":"redis: can't parse map reply: %.100q","messagePattern":"redis: can't parse map reply: %\\.100q","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/proto/reader.go","lineNumber":770,"sourceCode":"\tline, err := r.ReadLine()\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\tswitch line[0] {\n\tcase RespMap:\n\t\treturn replyLen(line)\n\tcase RespArray, RespSet, RespPush:\n\t\t// Some commands and RESP2 protocol may respond to array types.\n\t\tn, err := replyLen(line)\n\t\tif err != nil {\n\t\t\treturn 0, err\n\t\t}\n\t\tif n%2 != 0 {\n\t\t\treturn 0, fmt.Errorf(\"redis: the length of the array must be a multiple of 2, got: %d\", n)\n\t\t}\n\t\treturn n / 2, nil\n\tdefault:\n\t\treturn 0, fmt.Errorf(\"redis: can't parse map reply: %.100q\", line)\n\t}\n}\n\n// DiscardNext read and discard the data represented by the next line.\nfunc (r *Reader) DiscardNext() error {\n\tline, err := r.readLine()\n\tif err != nil {\n\t\treturn err\n\t}\n\treturn r.Discard(line)\n}\n\n// Discard the data represented by line.\nfunc (r *Reader) Discard(line []byte) (err error) {\n\tif len(line) == 0 {\n\t\treturn errors.New(\"redis: invalid line\")\n\t}\n\tswitch line[0] {","sourceCodeStart":752,"sourceCodeEnd":788,"githubUrl":"https://github.com/go-redis/redis/blob/36d97525cd8076aed67cddf54778e9ea84550929/internal/proto/reader.go#L752-L788","documentation":"Error \"redis: can't parse map reply: %.100q\" thrown in go-redis/redis.","triggerScenarios":"Thrown at internal/proto/reader.go:770 when the library encounters an invalid state.","commonSituations":"Fail the connection on malformed map frames.","solutions":["Check the quoted reply; the map frame is malformed","Reconnect to resynchronize"],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"analyzedSha":"36d97525cd8076aed67cddf54778e9ea84550929","analyzedAt":"2026-08-06T01:08:27.376Z","schemaVersion":2}