Skip to content
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

Unhandled errors not marking sessions as crashed #1190

Closed
bruno-garcia opened this issue Sep 10, 2021 · 1 comment
Closed

Unhandled errors not marking sessions as crashed #1190

bruno-garcia opened this issue Sep 10, 2021 · 1 comment
Assignees
Labels
Bug Something isn't working

Comments

@bruno-garcia
Copy link
Member

bruno-garcia commented Sep 10, 2021

var e when e.SentryExceptions?.Any(x => !(x.Mechanism?.Handled ?? true)) ?? false =>
_sessionManager.EndSession(SessionEndStatus.Crashed),
// Event contains a non-terminal exception -> report error
// (this might return null if the session has already reported errors before)
var e when e.Exception is not null || e.SentryExceptions?.Any() == true =>
_sessionManager.ReportError(),

In the first part it assumes the event already has Mechanism.Handled but that's only set further down on the client when reading from the Exception.Data

So events are only counting as Errored

We need the logic that inspects an instance of an exception for the Mechanism data pulled to an internal method that can be used in the hub while dealing with sessions as well as within the client (where it's currently used)

@bruno-garcia bruno-garcia added the Bug Something isn't working label Sep 10, 2021
@bruno-garcia
Copy link
Member Author

Resolved in #1193

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants