Refactor SentryReporter to parse last core output for specific exception types #7727
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR refactors the
SentryReporter
class to parse the "last core output" only for specific exception types. Thesend_event
function now checks if the exception type is in a predefined set of types that require parsing. If it is, the last core output is split for better representation in the web view and then parsed using theparse_last_core_output
function. The resulting core exception is added to the exceptions list, along with some additional modifications to remove unnecessary information.Additionally, a new test case has been added to ensure that the
send_event
function correctly callsparse_last_core_output
only for specific exception types.It continues the work done in #7722 and makes the logic of #7066 safer.