{"record":{"id":"dc10e760abc24d72","repo":"redis/go-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/redis/go-redis/blob/c5cad058c72f58370553b48566302303cf8a2e89/pubsub.go#L462-L498","documentation":"Error \"redis: unsupported pubsub message: %q\" thrown in redis/go-redis.","triggerScenarios":"Thrown at pubsub.go:480 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"c5cad058c72f58370553b48566302303cf8a2e89","analyzedAt":"2026-09-01T06:50:53.388Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}