I get the error error:ERR value is not an integer or out of range code:
when doing client.set.
The error returned contains
{
"command": "SET",
"args": [
"1fd24e820c01a0695048558632dfb832", "VERY_LONG_TEXT",
"EX",
null
],
"code": "ERR"
}
where VERY_LONG_TEXT
is a string of ~80KB characters
@loretoparisi the problem is the third argument as it's set to null
.
@BridgeAR thank you! So it seems it was the cache expire in my api wrapper, just added this simple check
function isInt(value) {
return !isNaN(value) && (function (x) { return (x | 0) === x; })(parseFloat(value))
}
var expire = isInt(expireValue)?expireValue:defaultValue
self.client.set(key, value, 'EX', expire, function (err, res) {
// res is null when the key is missing
if (err) self.logger.error("RedisStore.set err %@", err);
else self.logger.debug("RedisStore.set %@", key);
return callback(err, res);
});
Most helpful comment
@loretoparisi the problem is the third argument as it's set to
null
.