nic-6443 commented on code in PR #12445:
URL: https://github.com/apache/apisix/pull/12445#discussion_r2601366437
##########
apisix/discovery/nacos/init.lua:
##########
@@ -315,10 +331,12 @@ local function fetch_full_registry(premature)
local key = get_key(namespace_id, group_name,
service_info.service_name)
service_names[key] = true
for _, host in ipairs(data.hosts) do
+ assert(host.metadata == nil or type(host.metadata) == "table")
Review Comment:
`assert` will directly cause the program to panic and should be replaced
with an error log to record illegal data. The program needs to consider various
exceptional situations.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]