return error message
This commit is contained in:
@@ -39,12 +39,16 @@ local function get_access_token()
|
||||
ngx.say(pl.write(resp_err))
|
||||
ngx.exit(resp.status)
|
||||
else
|
||||
ngx.log(ngx.ERR, "RESP IS OK -> ", pl.write(resp.body))
|
||||
ngx.log(ngx.ERR, "RESP IS OK -> ", pl.write(resp.body))
|
||||
return cjson.decode(resp.body).d
|
||||
end
|
||||
else
|
||||
ngx.log(ngx.ERR, "FAILED TO CONNECT TO *HTYUC* RESP STATUS ->", resp.status)
|
||||
ngx.exit(resp.status)
|
||||
if resp == nil then
|
||||
resp = ""
|
||||
end
|
||||
ngx.log(ngx.ERR, "FAILED TO CONNECT TO *HTYUC*: httpc throws runtime error, please check HTYUC log. / ", pl.write(resp))
|
||||
ngx.say(pl.write(resp))
|
||||
ngx.exit(401)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user