chore(lint): Use logging.exception instead of logging.error (#10415)

This commit is contained in:
Bowen Liang 2024-11-07 21:13:02 +08:00 committed by GitHub
commit 574c4a264f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
22 changed files with 31 additions and 30 deletions

View file

@ -69,7 +69,7 @@ class BaseNode(Generic[GenericNodeData]):
try:
result = self._run()
except Exception as e:
logger.error(f"Node {self.node_id} failed to run: {e}")
logger.exception(f"Node {self.node_id} failed to run: {e}")
result = NodeRunResult(
status=WorkflowNodeExecutionStatus.FAILED,
error=str(e),

View file

@ -127,7 +127,7 @@ class QuestionClassifierNode(LLMNode):
category_id = category_id_result
except OutputParserError:
logging.error(f"Failed to parse result text: {result_text}")
logging.exception(f"Failed to parse result text: {result_text}")
try:
process_data = {
"model_mode": model_config.mode,