You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Caught/Handled exceptions are always being logged as unhandled (@sentry/serverless) #5408
Create a Lambda function and wrap it with the Sentry.AWSLambda.wrapHandler()
Create a try/catch block
In the try block, throw an error
In the catch block, call Sentry.captureException(error) to catch and log the error
Expected behavior is that the handled tag is set to true because the error or exception was caught within the tr/catch and not the wrapHandler. However, the caught error is always flagged as unhandled handled:false
This might be the relevant code according to this Discord discussion in Sentry discord :
I think we're going to take a look at handled in general - we should write up a new GH issue summarizing all the problems and gather feedback accordingly.
In the meantime, @whats-a-handle appreciate your patience while we engage in some due diligence to make sure we cover all the cases appropriately.
I know it's been over a year, but I wanted to follow up on this because I just ran into this at work (calling Sentry.captureException in a Node backend and having it arrive in Sentry as "unhandled"). I notice the issue is open but it's had the backlog label removed; is the plan to leave the current behavior as-is?
Activity
lobsterkatie commentedon Jul 12, 2022
related: #5375, though that's the opposite problem.
AbhiPrasad commentedon Jul 12, 2022
I think we're going to take a look at
handledin general - we should write up a new GH issue summarizing all the problems and gather feedback accordingly.In the meantime, @whats-a-handle appreciate your patience while we engage in some due diligence to make sure we cover all the cases appropriately.
rtfeldman commentedon Oct 24, 2023
I know it's been over a year, but I wanted to follow up on this because I just ran into this at work (calling
Sentry.captureExceptionin a Node backend and having it arrive in Sentry as "unhandled"). I notice the issue is open but it's had thebackloglabel removed; is the plan to leave the current behavior as-is?AbhiPrasad commentedon Oct 25, 2023
Opened #9368 to fix this, thanks for the reminder @rtfeldman!
rtfeldman commentedon Oct 25, 2023
Awesome, thank you so much! 😃
AbhiPrasad commentedon Oct 27, 2023
Change was released with https://github.com/getsentry/sentry-javascript/releases/tag/7.76.0