File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
src/sentry/grouping/strategies Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -639,11 +639,9 @@ def chained_exception(
639
639
# exceptions. Either way, we need to wrap our exception components in a chained exception component.
640
640
exception_components_by_variant : dict [str , list [ExceptionGroupingComponent ]] = {}
641
641
642
- # Check for cases in which we want to switch the `main_exception_id` in order to use a different
642
+ # Handle cases in which we want to switch the `main_exception_id` in order to use a different
643
643
# exception than normal for the event title
644
- main_exception_id = determine_main_exception_id (exceptions )
645
- if main_exception_id :
646
- event .data ["main_exception_id" ] = main_exception_id
644
+ _maybe_override_main_exception_id (event , exceptions )
647
645
648
646
for exception in exceptions :
649
647
for variant_name , component in exception_components_by_exception [id (exception )].items ():
@@ -897,11 +895,12 @@ def react_error_with_cause(exceptions: list[SingleException]) -> int | None:
897
895
]
898
896
899
897
900
- def determine_main_exception_id ( exceptions : list [SingleException ]) -> int | None :
898
+ def _maybe_override_main_exception_id ( event : Event , exceptions : list [SingleException ]) -> None :
901
899
main_exception_id = None
902
900
for func in MAIN_EXCEPTION_ID_FUNCS :
903
901
main_exception_id = func (exceptions )
904
902
if main_exception_id is not None :
905
903
break
906
904
907
- return main_exception_id
905
+ if main_exception_id :
906
+ event .data ["main_exception_id" ] = main_exception_id
You can’t perform that action at this time.
0 commit comments