{"id":"a3334eadf5ec3666","repo":"go-redis/redis","slug":"redis-unsupported-pubsub-message-q","errorCode":null,"errorMessage":"redis: unsupported pubsub message: %q","messagePattern":"redis: unsupported pubsub message: %q","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pubsub.go","lineNumber":480,"sourceCode":"\t\t\tdefault:\n\t\t\t\treturn nil, fmt.Errorf(\"redis: unsupported pubsub message payload: %T\", payload)\n\t\t\t}\n\t\tcase \"pmessage\":\n\t\t\tchannel := reply[2].(string)\n\t\t\tmsg := &Message{\n\t\t\t\tPattern: reply[1].(string),\n\t\t\t\tChannel: channel,\n\t\t\t\tPayload: reply[3].(string),\n\t\t\t}\n\t\t\t// Record PubSub message received (pattern message, not sharded)\n\t\t\totel.RecordPubSubMessage(ctx, cn, \"received\", channel, false)\n\t\t\treturn msg, nil\n\t\tcase \"pong\":\n\t\t\treturn &Pong{\n\t\t\t\tPayload: reply[1].(string),\n\t\t\t}, nil\n\t\tdefault:\n\t\t\treturn nil, fmt.Errorf(\"redis: unsupported pubsub message: %q\", kind)\n\t\t}\n\tdefault:\n\t\treturn nil, fmt.Errorf(\"redis: unsupported pubsub message: %#v\", reply)\n\t}\n}\n\n// ReceiveTimeout acts like Receive but returns an error if message\n// is not received in time. This is low-level API and in most cases\n// Channel should be used instead.\nfunc (c *PubSub) ReceiveTimeout(ctx context.Context, timeout time.Duration) (interface{}, error) {\n\tif c.cmd == nil {\n\t\tc.cmd = NewCmd(ctx)\n\t}\n\n\t// Don't hold the lock to allow subscriptions and pings.\n\tcn, err := c.connWithLock(ctx)\n\tif err != nil {\n\t\treturn nil, err","sourceCodeStart":462,"sourceCodeEnd":498,"githubUrl":"https://github.com/go-redis/redis/blob/36d97525cd8076aed67cddf54778e9ea84550929/pubsub.go#L462-L498","documentation":"Error \"redis: unsupported pubsub message: %q\" thrown in go-redis/redis.","triggerScenarios":"Thrown at pubsub.go:480 when the library encounters an invalid state.","commonSituations":"Keep go-redis current with the server version to support all message kinds.","solutions":["Check the quoted message kind; the server sent an unsupported pubsub frame type","Upgrade go-redis if the server uses newer pubsub message kinds"],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"analyzedSha":"36d97525cd8076aed67cddf54778e9ea84550929","analyzedAt":"2026-08-06T01:08:27.376Z","schemaVersion":2}