From 99d0ef75b2ce319df000e37cf28dc4e458b95e42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=98=BF=E7=94=B7?= Date: Sun, 26 Jun 2022 18:40:12 +0800 Subject: [PATCH] exit on error --- scripts/wx_download.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/wx_download.lua b/scripts/wx_download.lua index 86893b7..560dab8 100644 --- a/scripts/wx_download.lua +++ b/scripts/wx_download.lua @@ -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