Skip to content

ref(grouping): Consolidate main exception id override logic #97541

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
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
Prev Previous commit
Next Next commit
s/determine_main_exception_id/_maybe_override_main_exception_id
  • Loading branch information
lobsterkatie committed Aug 8, 2025
commit 5c55e70e4e8ea9f1bddcf742721e7c6314392af3
4 changes: 2 additions & 2 deletions src/sentry/grouping/strategies/newstyle.py
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,7 @@ def chained_exception(

# Check for cases in which we want to switch the `main_exception_id` in order to use a different
# exception than normal for the event title
determine_main_exception_id(event, exceptions)
_maybe_override_main_exception_id(event, exceptions)

for exception in exceptions:
for variant_name, component in exception_components_by_exception[id(exception)].items():
Expand Down Expand Up @@ -898,7 +898,7 @@ def react_error_with_cause(exceptions: list[SingleException]) -> int | None:
]


def determine_main_exception_id(event: Event, exceptions: list[SingleException]) -> None:
def _maybe_override_main_exception_id(event: Event, exceptions: list[SingleException]) -> None:
main_exception_id = None
for func in MAIN_EXCEPTION_ID_FUNCS:
main_exception_id = func(exceptions)
Expand Down