Skip to content

Commit 104b3a9

Browse files
committed
Mechanism should default to true unless set explicitly
1 parent 72455f4 commit 104b3a9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

sentry_sdk/utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -637,13 +637,14 @@ def single_exception_from_error_tuple(
637637
mechanism=None, # type: Optional[Dict[str, Any]]
638638
):
639639
# type: (...) -> Dict[str, Any]
640+
mechanism = mechanism or {"type": "generic", "handled": True}
641+
640642
if exc_value is not None:
641643
errno = get_errno(exc_value)
642644
else:
643645
errno = None
644646

645647
if errno is not None:
646-
mechanism = mechanism or {"type": "generic"}
647648
mechanism.setdefault("meta", {}).setdefault("errno", {}).setdefault(
648649
"number", errno
649650
)

0 commit comments

Comments
 (0)