This is an automated email from the ASF dual-hosted git repository.

shreemaanabhishek pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix.git


The following commit(s) were added to refs/heads/master by this push:
     new 19e5aded0 refactor(limit-count): throw panic error upon invalid parent 
(#13030)
19e5aded0 is described below

commit 19e5aded0f5c965758036567ad5769fcfa6b7921
Author: Mohammad Izzraff Janius 
<[email protected]>
AuthorDate: Fri Feb 27 13:13:04 2026 +0800

    refactor(limit-count): throw panic error upon invalid parent (#13030)
---
 apisix/plugins/limit-count/init.lua | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/apisix/plugins/limit-count/init.lua 
b/apisix/plugins/limit-count/init.lua
index f7483fdad..ec8a02f8b 100644
--- a/apisix/plugins/limit-count/init.lua
+++ b/apisix/plugins/limit-count/init.lua
@@ -26,6 +26,7 @@ local tonumber = tonumber
 local type = type
 local tostring = tostring
 local str_format = string.format
+local error = error
 
 local limit_redis_cluster_new
 local limit_redis_new
@@ -258,8 +259,7 @@ local function gen_limit_key(conf, ctx, key)
     -- A route which reuses a previous route's ID will inherits its counter.
     local parent = conf._meta and conf._meta.parent
     if not parent or not parent.resource_key then
-        core.log.error("failed to generate key invalid parent: ", 
core.json.encode(parent))
-        return nil
+        error("failed to generate key invalid parent: ", 
core.json.encode(parent))
     end
 
     local new_key = parent.resource_key .. ':' .. 
apisix_plugin.conf_version(conf)

Reply via email to