membphis commented on code in PR #12304:
URL: https://github.com/apache/apisix/pull/12304#discussion_r2137238172


##########
apisix/discovery/consul/init.lua:
##########
@@ -225,8 +225,8 @@ local function watch_catalog(consul_server)
     ::RETRY::
     local watch_result, watch_err = 
client:get(consul_server.consul_watch_catalog_url)
     local watch_error_info = (watch_err ~= nil and watch_err)

Review Comment:
   shorter is clearer, you can take a look. if you would like my way, you can 
make a try
   
   ```lua
       local res, err = client:get(consul_server.consul_watch_catalog_url)
       err = err or (res and res.status ~= 200 and res.status)
   ```



-- 
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: notifications-unsubscr...@apisix.apache.org

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

Reply via email to