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
Typically in .Net, calling Exception.ToString returns the exceptions from inner-most to outer-most. I was surprised to see that Sentry does the opposite.
I am using Sentry in Unity along with ProtoPromise async library, and when ProtoPromise encounters an uncaught exception, it wraps it in another exception. This doesn't play well with Sentry, because all our exceptions display exactly the same (until we dig into the details). Is there a setting where I can invert this to display more like Unity's cloud diagnostics?
Hey @timcassell, sorry to see you run into issues. Looking into it it seems like we're "hardcoding" this behaviour in the MainExceptionProcessorhere. Afaik we're going this to create a oldest->newest behaviour.
I'll have to see if we can make this behaviour optional and what side-effects this introduces.
AFAICT that code does what I'd expect. It walks the inner exceptions then reverses them, so the inner-most is first in the list. So the cause must be somewhere else.
Unfortunately, I don't think this is going to be a straight forward fix that is happening anytime soon.
But what you can do to unblock yourself is implementing a BeforeSend and inverse the offending exceptions yourself.
Something like
It was working for a while, but for the past few months I've been seeing once again the same issue. So I thought maybe it was fixed. I tried removing the workaround, but it doesn't make a difference anymore. I see the same thing in the feed either way.
Activity
linear commentedon Aug 15, 2025
ENG-5294 Show inner-most exception?
getsantry commentedon Aug 15, 2025
Assigning to @getsentry/support for routing ⏲️
linear commentedon Aug 15, 2025
UNITY-160 Show inner-most exception?
bitsandfoxes commentedon Aug 18, 2025
Hey @timcassell, sorry to see you run into issues. Looking into it it seems like we're "hardcoding" this behaviour in the
MainExceptionProcessorhere. Afaik we're going this to create aoldest->newestbehaviour.I'll have to see if we can make this behaviour optional and what side-effects this introduces.
timcassell commentedon Aug 23, 2025
AFAICT that code does what I'd expect. It walks the inner exceptions then reverses them, so the inner-most is first in the list. So the cause must be somewhere else.
bitsandfoxes commentedon Aug 26, 2025
Unfortunately, I don't think this is going to be a straight forward fix that is happening anytime soon.
But what you can do to unblock yourself is implementing a
BeforeSendand inverse the offending exceptions yourself.Something like
bruno-garcia commentedon Aug 26, 2025
@bitsandfoxes can you expand why it's hard to fix this and why there can't be a fix anytime soon? I didn't get that from your message
timcassell commentedon Mar 26, 2026
I've been using this workaround:
It was working for a while, but for the past few months I've been seeing once again the same issue. So I thought maybe it was fixed. I tried removing the workaround, but it doesn't make a difference anymore. I see the same thing in the feed either way.
bitsandfoxes commentedon Mar 30, 2026
As in, you reversing it is reversing it? I'm not aware of any changes in that regard in the Sentry SDK for .NET, @Flash0ver are you?