Sometimes i am getting following error while trying to increment value in hash field.
{ ReplyError: ERR hash value is not an integer
at parseError (/opt/node-app/node_modules/redis-parser/lib/parser.js:193:12)
at parseType (/opt/node-app/node_modules/redis-parser/lib/parser.js:303:14)
command: 'HINCRBY',
args: [ 'users:5b0598cd2f197a557e13e9d5', 'nTotalChips', 700 ],
code: 'ERR' }
My code is as follows:
redisClient.hincrby("users:5b0598cd2f197a557e13e9d5", "nTotalChips", 700, function(err, nTotalChips) {
//some other logic
});
I got some hint by reading that this is error due to serialization, but i didnt got where exactly it is because this error not generated all the time.