If you get an error that reads “WRONGTYPE Operation against a key holding the wrong kind of value” when using the ZUNION
or ZUNIONSTORE
commands in Redis, it’s because you’re passing a key with the wrong data type.
To fix this issue, make sure the keys you pass to these commands contain either sets or sorted sets. Although these commands are for sorted sets, they also work with non-sorted sets.
Continue reading