exit on error

This commit is contained in:
2022-06-26 18:40:12 +08:00
parent e9fdd151d3
commit 99d0ef75b2
+2 -2
View File
@@ -6,7 +6,6 @@ local sudoerToken = ngx.req.get_headers().HtySudoerToken
local htyhostHeader = ngx.req.get_headers().HtyHost
local function get_access_token()
local htyuc = ngx.var.htyuc
local host = ngx.var.host
local wx_domain = ngx.var.wx_domain
@@ -44,7 +43,8 @@ local function get_access_token()
return cjson.decode(resp.body).d
end
else
ngx.log(ngx.ERR, "FAILED TO CONNECT TO *HTYUC* ->", pl.write(resp))
ngx.log(ngx.ERR, "FAILED TO CONNECT TO *HTYUC* RESP STATUS ->", resp.status)
ngx.exit(resp.status)
end
end