fix: enhance error logging with exception info across multiple modules

This commit is contained in:
Alex
2025-05-05 13:12:39 +01:00
parent cf333873fd
commit 481df4d604
14 changed files with 37 additions and 30 deletions

View File

@@ -1,5 +1,6 @@
import json
import logging
import logging
from abc import ABC, abstractmethod
from application.logging import build_stack_data
@@ -137,6 +138,7 @@ class OpenAILLMHandler(LLMHandler):
messages = self.prepare_messages_with_attachments(agent, messages, attachments)
except Exception as e:
logging.error(f"Error executing tool: {str(e)}", exc_info=True)
messages.append(
{
"role": "tool",
@@ -229,6 +231,7 @@ class OpenAILLMHandler(LLMHandler):
)
except Exception as e:
logging.error(f"Error executing tool: {str(e)}", exc_info=True)
messages.append(
{
"role": "assistant",