Skip to content

Commit 9136c96

Browse files
committed
fix: handle non exceptions
Fixes #29
1 parent 162ea9e commit 9136c96

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/collective/sentry/error_handler.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,11 @@ def _ignore_error(event):
5151
except (AttributeError, KeyError, IndexError):
5252
error_log = None
5353

54-
if error_log and exc_info[0].__name__ in error_log._ignored_exceptions:
54+
name = False
55+
if exc_info and exc_info[0]:
56+
name = exc_info[0].__name__
57+
58+
if error_log and name and name in error_log._ignored_exceptions:
5559
return True
5660

5761
return False

0 commit comments

Comments
 (0)