Skip to content
This repository was archived by the owner on Jun 13, 2023. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion epsagon/event.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,10 @@ def set_exception(
:param from_logs: True if the exception was captured from logging
"""
self.error_code = ErrorCode.EXCEPTION
self.exception['type'] = type(exception).__name__
if hasattr(type(exception), '__name__'):
self.exception['type'] = type(exception).__name__
else:
self.exception['type'] = 'Unknown'
self.exception['message'] = str(exception)
self.exception['traceback'] = traceback_data
self.exception['time'] = time.time()
Expand Down