{"id":"03eafb303f6c38e3","repo":"go-redis/redis","slug":"redis-can-t-parse-push-notification-name-q","errorCode":null,"errorMessage":"redis: can't parse push notification name: %q","messagePattern":"redis: can't parse push notification name: %q","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/proto/reader.go","lineNumber":217,"sourceCode":"\t}\n\tif !ok {\n\t\treturn \"\", false, nil\n\t}\n\t// Reject \">\\r\\n\": RESP requires at least one digit for the array length.\n\t// Without this check the empty length looks like a valid prefix and the\n\t// caller would block fetching more bytes for a frame that is already\n\t// malformed.\n\tif pos-2 == arrayLenStart {\n\t\treturn \"\", false, fmt.Errorf(\"redis: empty push notification array length\")\n\t}\n\n\t// First element type byte: '$' (bulk) or '+' (simple-string).\n\tif pos >= len(buf) {\n\t\treturn \"\", false, nil\n\t}\n\ttypeOfName := buf[pos]\n\tif typeOfName != RespString && typeOfName != RespStatus {\n\t\treturn \"\", false, fmt.Errorf(\"redis: can't parse push notification name: %q\", buf[pos:])\n\t}\n\tpos++\n\n\tif typeOfName == RespString {\n\t\t// Read \"$M\\r\\n\" then the M-byte name.\n\t\tlenStart := pos\n\t\tnext, ok, err := skipDigitsThenCRLF(buf, pos)\n\t\tif err != nil {\n\t\t\treturn \"\", false, fmt.Errorf(\"redis: can't parse push notification name length: %w\", err)\n\t\t}\n\t\tif !ok {\n\t\t\treturn \"\", false, nil\n\t\t}\n\t\tif next-2 == lenStart {\n\t\t\treturn \"\", false, fmt.Errorf(\"redis: empty push notification name length\")\n\t\t}\n\t\tnameLen, err := util.Atoi(buf[lenStart : next-2])\n\t\tif err != nil {","sourceCodeStart":199,"sourceCodeEnd":235,"githubUrl":"https://github.com/go-redis/redis/blob/36d97525cd8076aed67cddf54778e9ea84550929/internal/proto/reader.go#L199-L235","documentation":"Error \"redis: can't parse push notification name: %q\" thrown in go-redis/redis.","triggerScenarios":"Thrown at internal/proto/reader.go:217 when the library encounters an invalid state.","commonSituations":"On any push parse error, close the connection rather than continuing a desynchronized stream.","solutions":["Check the server/proxy emitting the notification name; the quoted value in the error shows what was received","Reconnect to resynchronize the frame stream"],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"analyzedSha":"36d97525cd8076aed67cddf54778e9ea84550929","analyzedAt":"2026-08-06T01:08:27.376Z","schemaVersion":2}