diff --git a/cognee/shared/logging_utils.py b/cognee/shared/logging_utils.py index 2a96c6f8c..4d2ee7f52 100644 --- a/cognee/shared/logging_utils.py +++ b/cognee/shared/logging_utils.py @@ -213,7 +213,8 @@ def setup_logging(log_level=None, name=None): else: exc_type, exc_value, tb = sys.exc_info() - event_dict["exception_type"] = exc_type.__name__ + if hasattr(exc_type, __name__): + event_dict["exception_type"] = exc_type.__name__ event_dict["exception_message"] = str(exc_value) event_dict["traceback"] = True