Skip to content

Sentry doesn't correctly set error.unhandled, so issues don't appear on the Sentry project page #1283

Closed

Description

@kanadaj

Environment

How do you use Sentry?
Self-hosted, 21.10.0

Which SDK and version?
.NET 3.10.0

Steps to Reproduce

  1. Set up Sentry on an ASP.NET Core application, trigger an uncaught exception in a controller or page

Expected Result

Issue should appear in the Sentry project frequent issues list

Actual Result

image

See that errors are in the chart, but issues don't show in the list

Do note that errors from inside a middleware show correctly:

image

Activity

  1. lucas-zimerman commented on Oct 21, 2021

    @lucas-zimerman
    Collaborator

    In order to register the Unhandled flag, The ASP.NET Core SDK Requires you to use the UseExceptionHandler middleware or middle that implements the interface IExceptionHandlerFeature .

    And by any chance, are you using the Sentry options called MinimumEventLevel?

  2. kanadaj commented on Oct 22, 2021

    @kanadaj
    ContributorAuthor

    In order to register the Unhandled flag, The ASP.NET Core SDK Requires you to use the UseExceptionHandler middleware or middle that implements the interface IExceptionHandlerFeature .

    I use app.UseExceptionHandler("/Home/Error"); so that should do it. I'm also using the Serilog Sentry sink, so maybe it's that?

    And by any chance, are you using the Sentry options called MinimumEventLevel?

    Nope!

  3. lucas-zimerman commented on Oct 22, 2021

    @lucas-zimerman
    Collaborator

    In order to register the Unhandled flag, The ASP.NET Core SDK Requires you to use the UseExceptionHandler middleware or middle that implements the interface IExceptionHandlerFeature .

    I use app.UseExceptionHandler("/Home/Error"); so that should do it. I'm also using the Serilog Sentry sink, so maybe it's that?

    And by any chance, are you using the Sentry options called MinimumEventLevel?

    Nope!

    I see, could you try setting the options MinimumEventLevel as None?

  4. kanadaj commented on Oct 22, 2021

    @kanadaj
    ContributorAuthor

    Yeah I don't think that worked

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugFramework: ASP.NET Core

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions