fix: Resolve issue with missing name if no attribute (#707)

<!-- .github/pull_request_template.md -->

## Description
Resolve issue with missing name if no attribute

## DCO Affirmation
I affirm that all code in every commit of this pull request conforms to
the terms of the Topoteretes Developer Certificate of Origin.
This commit is contained in:
Igor Ilic 2025-04-08 11:46:18 +02:00 committed by GitHub
parent 0ca8ef2448
commit 6f4c117005
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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