nicolasff / webdis

A Redis HTTP interface with JSON output
https://webd.is
BSD 2-Clause "Simplified" License
2.82k stars 307 forks source link

Operation against a key holding the wrong kind of value in redis when pushing data on a list #121

Closed ashuthinks closed 8 years ago

ashuthinks commented 8 years ago

Created redis list and setting key like following getting me error

public async Task MyMethod() { RedisList list = new RedisList(Settings, typeof(T).Name.ToString()); string mykey = "myId"; await list.LeftPush(mykey); getting following error :

Result Message: StackExchange.Redis.RedisServerException : ERR Operation against a key holding the wrong kind of value

nicolasff commented 8 years ago

This is because your key myId is not a list, you need to create it with LPUSH first. You'd have better luck asking for advice on StackOverflow or the redis mailing list.