Describe the bug
Discovered when testing #182. The following script:
local conj_ttl = redis.call('ttl', conj_key)
if conj_ttl < timeout then
-- some code
end
expects conj_ttl always to be a number. Dragonfly instead returns errors as lua tables (aka js-like objects) with a detailed cause.
To Reproduce
Dragonfly:
127.0.0.1:6379> EVAL "return redis.call('ttl', 'nonexistent')" 0
(error) ERR script tried accessing undeclared key
Redis:
127.0.0.1:6379> EVAL "return redis.call('ttl', 'nonexistent')" 0
(integer) -2
Expected behavior
Return sentinel errors in scripts as lua numbers