juzhiyuan commented on a change in pull request #5174: URL: https://github.com/apache/apisix/pull/5174#discussion_r724107103
########## File path: apisix/admin/init.lua ########## @@ -215,12 +215,12 @@ local function run_stream() local resource = resources[seg_res] if not resource then - core.response.exit(404) + core.response.exit(404, {error_msg="not found"}) end local method = str_lower(get_method()) if not resource[method] then - core.response.exit(404) + core.response.exit(404, {error_msg="not found"}) Review comment: according to https://github.com/apache/apisix/blob/master/CODE_STYLE.md#space , I would prefer using `xx = xx` ########## File path: apisix/admin/init.lua ########## @@ -192,13 +192,13 @@ local function run_stream() if not local_conf.apisix.stream_proxy then core.log.warn("stream mode is disabled, can not to add any stream ", "route") - core.response.exit(400) + core.response.exit(400, {error_msg="stream mode is disabled, can not " .. Review comment: Would better use `routes` instead of `route`? -- 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