{"id":"ab5e9ecb7c2b8ebb","repo":"go-redis/redis","slug":"redis-can-t-parse-array-set-push-reply-100q","errorCode":null,"errorMessage":"redis: can't parse array/set/push reply: %.100q","messagePattern":"redis: can't parse array/set/push reply: %\\.100q","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/proto/reader.go","lineNumber":731,"sourceCode":"\t\treturn err\n\t}\n\tif n != fixedLen {\n\t\treturn fmt.Errorf(\"redis: got %d elements in the array, wanted %d\", n, fixedLen)\n\t}\n\treturn nil\n}\n\n// ReadArrayLen Read and return the length of the array.\nfunc (r *Reader) ReadArrayLen() (int, error) {\n\tline, err := r.ReadLine()\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\tswitch line[0] {\n\tcase RespArray, RespSet, RespPush:\n\t\treturn replyLen(line)\n\tdefault:\n\t\treturn 0, fmt.Errorf(\"redis: can't parse array/set/push reply: %.100q\", line)\n\t}\n}\n\n// ReadFixedMapLen reads fixed map length.\nfunc (r *Reader) ReadFixedMapLen(fixedLen int) error {\n\tn, err := r.ReadMapLen()\n\tif err != nil {\n\t\treturn err\n\t}\n\tif n != fixedLen {\n\t\treturn fmt.Errorf(\"redis: got %d elements in the map, wanted %d\", n, fixedLen)\n\t}\n\treturn nil\n}\n\n// ReadMapLen reads the length of the map type.\n// If responding to the array type (RespArray/RespSet/RespPush),\n// it must be a multiple of 2 and return n/2.","sourceCodeStart":713,"sourceCodeEnd":749,"githubUrl":"https://github.com/go-redis/redis/blob/36d97525cd8076aed67cddf54778e9ea84550929/internal/proto/reader.go#L713-L749","documentation":"Error \"redis: can't parse array/set/push reply: %.100q\" thrown in go-redis/redis.","triggerScenarios":"Thrown at internal/proto/reader.go:731 when the library encounters an invalid state.","commonSituations":"Treat aggregate-length parse failures as connection-fatal.","solutions":["Check the quoted reply; the aggregate frame is malformed","Reconnect to resynchronize the stream"],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"analyzedSha":"36d97525cd8076aed67cddf54778e9ea84550929","analyzedAt":"2026-08-06T01:08:27.376Z","schemaVersion":2}