fix: add exception handling

This commit is contained in:
Saboteur7
2024-11-15 11:58:10 +08:00
parent 9421d44579
commit cf84e57f81

View File

@@ -31,6 +31,7 @@ class Util:
@staticmethod
def fetch_app_plugin(app_code: str, plugin_name: str) -> bool:
try:
headers = {"Authorization": "Bearer " + conf().get("linkai_api_key")}
# do http request
base_url = conf().get("linkai_api_base", "https://api.link-ai.tech")
@@ -45,3 +46,5 @@ class Util:
else:
logger.warning(f"[LinkAI] find app info exception, res={res}")
return False
except Exception as e:
return False