mirror of
https://github.com/zhayujie/chatgpt-on-wechat.git
synced 2026-07-21 14:17:11 +08:00
fix: add exception handling
This commit is contained in:
@@ -31,6 +31,7 @@ class Util:
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def fetch_app_plugin(app_code: str, plugin_name: str) -> bool:
|
def fetch_app_plugin(app_code: str, plugin_name: str) -> bool:
|
||||||
|
try:
|
||||||
headers = {"Authorization": "Bearer " + conf().get("linkai_api_key")}
|
headers = {"Authorization": "Bearer " + conf().get("linkai_api_key")}
|
||||||
# do http request
|
# do http request
|
||||||
base_url = conf().get("linkai_api_base", "https://api.link-ai.tech")
|
base_url = conf().get("linkai_api_base", "https://api.link-ai.tech")
|
||||||
@@ -45,3 +46,5 @@ class Util:
|
|||||||
else:
|
else:
|
||||||
logger.warning(f"[LinkAI] find app info exception, res={res}")
|
logger.warning(f"[LinkAI] find app info exception, res={res}")
|
||||||
return False
|
return False
|
||||||
|
except Exception as e:
|
||||||
|
return False
|
||||||
|
|||||||
Reference in New Issue
Block a user