From b35aa232e8297f2f44e20036d4dbb56cccb0e79c Mon Sep 17 00:00:00 2001 From: AlinsRan Date: Mon, 6 Jul 2026 17:00:52 +0800 Subject: [PATCH] fix(dns): correct error() call in dns client initialization error()'s second argument is the level, not a message part, so the original error("...: ", err) dropped err (or raised a bad-argument error). Concatenate err into the message instead. --- apisix/discovery/dns/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apisix/discovery/dns/init.lua b/apisix/discovery/dns/init.lua index 601de0ebc9ee..197b7580d996 100644 --- a/apisix/discovery/dns/init.lua +++ b/apisix/discovery/dns/init.lua @@ -78,7 +78,7 @@ function _M.init_worker() local client, err = core.dns_client.new(opts) if not client then - error("failed to init the dns client: ", err) + error("failed to init the dns client: " .. (err or "unknown")) return end