membphis commented on a change in pull request #1928:
URL: https://github.com/apache/incubator-apisix/pull/1928#discussion_r462273477



##########
File path: apisix/plugins/limit-count/limit-count-redis.lua
##########
@@ -71,7 +71,8 @@ function _M.incoming(self, key)
     local remaining
     key = self.plugin_name .. tostring(key)
 
-    local ret = red:ttl(key)
+    -- todo: test case
+    local ret = red:ttl(key) or -2

Review comment:
       I think we need to cache the `err`, eg: `local ret, err = red:(...)`
   
   And we should write this error message to log, set the right response like 
`500`.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to