Skip to content

Commit 14812fc

Browse files
perf: Log Optimization for Advanced Applications Calling Remote Data Source APIs
1 parent b27e319 commit 14812fc

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

backend/apps/system/crud/assistant.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from common.core.db import engine
2020
from common.core.sqlbot_cache import cache
2121
from common.utils.aes_crypto import simple_aes_decrypt
22-
from common.utils.utils import equals_ignore_case, get_domain_list, string_to_numeric_hash
22+
from common.utils.utils import SQLBotLogUtil, equals_ignore_case, get_domain_list, string_to_numeric_hash
2323
from common.core.deps import Trans
2424

2525

@@ -145,7 +145,8 @@ def get_ds_from_api(self):
145145
else:
146146
raise Exception(f"Failed to get datasource list from {endpoint}, error: {result_json.get('message')}")
147147
else:
148-
raise Exception(f"Failed to get datasource list from {endpoint}, status code: {res.status_code}")
148+
SQLBotLogUtil.error(f"Failed to get datasource list from {endpoint}, response: {res}")
149+
raise Exception(f"Failed to get datasource list from {endpoint}, response: {res}")
149150

150151
def get_first_element(self, text: str):
151152
parts = re.split(r'[,;]', text.strip())

0 commit comments

Comments
 (0)