Replies: 3 comments 1 reply
-
Hey @cliedeman, are you able to isolate the AggregateException via a catch and rethrow in your code? try
{
throw new AggregateException(new Exception("This is a test exception"));;
}
catch (Exception e)
{
if (e is AggregateException { InnerException: not null } ae)
{
SentrySdk.CaptureException(ae.InnerException);
}
else
{
SentrySdk.CaptureException(e);
}
} |
Beta Was this translation helpful? Give feedback.
0 replies
-
I have tried something like this before. But then it doesn't pass through my aspnetcore sentry middleware. |
Beta Was this translation helpful? Give feedback.
0 replies
-
You could do this (that way it would get caught by the global exception handler logic from the middleware): try
{
throw new AggregateException(new Exception("This is a test exception"));;
}
catch (Exception e)
{
if (e is AggregateException { InnerException: not null } ae)
{
throw ae.InnerException;
}
else
{
throw;
}
} |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Problem Statement
I have an Exception where I am interested in the inner exception. I would like to unwrap the exception and allow the inner exception to continue down the exception processing pipeline - filtering etc.
Solution Brainstorm
No response
Beta Was this translation helpful? Give feedback.
All reactions