From 14812fce093a062a3ba25c091b7339cee64819cf Mon Sep 17 00:00:00 2001 From: fit2cloud-chenyw Date: Tue, 20 Jan 2026 16:23:21 +0800 Subject: [PATCH] perf: Log Optimization for Advanced Applications Calling Remote Data Source APIs --- backend/apps/system/crud/assistant.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/backend/apps/system/crud/assistant.py b/backend/apps/system/crud/assistant.py index a90528b3..b0a14aec 100644 --- a/backend/apps/system/crud/assistant.py +++ b/backend/apps/system/crud/assistant.py @@ -19,7 +19,7 @@ from common.core.db import engine from common.core.sqlbot_cache import cache from common.utils.aes_crypto import simple_aes_decrypt -from common.utils.utils import equals_ignore_case, get_domain_list, string_to_numeric_hash +from common.utils.utils import SQLBotLogUtil, equals_ignore_case, get_domain_list, string_to_numeric_hash from common.core.deps import Trans @@ -145,7 +145,8 @@ def get_ds_from_api(self): else: raise Exception(f"Failed to get datasource list from {endpoint}, error: {result_json.get('message')}") else: - raise Exception(f"Failed to get datasource list from {endpoint}, status code: {res.status_code}") + SQLBotLogUtil.error(f"Failed to get datasource list from {endpoint}, response: {res}") + raise Exception(f"Failed to get datasource list from {endpoint}, response: {res}") def get_first_element(self, text: str): parts = re.split(r'[,;]', text.strip())