diff --git a/apisix/plugins/limit-count/limit-count-redis.lua b/apisix/plugins/limit-count/limit-count-redis.lua index b71cd852b0a0..a4dfba51b36e 100644 --- a/apisix/plugins/limit-count/limit-count-redis.lua +++ b/apisix/plugins/limit-count/limit-count-redis.lua @@ -71,7 +71,12 @@ function _M.incoming(self, key) local remaining key = self.plugin_name .. tostring(key) - local ret = red:ttl(key) + -- todo: test case + local ret, err = red:ttl(key) + if not ret then + return false, "failed to get redis `" .. key .."` ttl: " .. err + end + core.log.info("ttl key: ", key, " ret: ", ret, " err: ", err) if ret < 0 then -- todo: test case