0

When I am passing a floating point number -3.074 to hincrby I am getting this error.

ReplyError: ERR value is not an integer or out of range

Code

console.log(typeof sizeInMB, sizeInMB) // number -3.074
redis.hincrby('MYHASH', 'storage', sizeInMB) // throws above error 

I am very new to redis, forgive me if I missed something obvious.

1 Answer 1

1

Got it working by changing hincrby to hincrbyfloat

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.