When updating/adding code, prioritize readability and predictable control-flow:
Example pattern (body parsing + early exit + logging):
local body, err = kong.request.get_body()
if err then
ngx_log(ngx.ERR, "cannot process request body: ", tostring(err))
return
end
local identifier = body -- proceed normally
Example logging without concatenation:
ngx_log(ngx.ERR, "request failed (", req_url, "): ", err)
Enter the URL of a public GitHub repository