No data.. ?
Sturla
Posted on
Sep 17 2022
Hi
I´m getting lot of these exceptions but there is no data at all coming with it.. Any idea why or what I can do about it?
Jason Fauchelle
Raygun
Posted on
Sep 18 2022
Hi Sturla,
Thanks for getting in touch. Generally the reason an Exception would have no StackTrace is because the Exception has not been thrown, so I wonder if that's the case here. To know for sure, you'll need to track down where this Exception is coming from - but that of course is tricky without a StackTrace.
I'd suggest starting by searching your codebase for the message (or individual words in the message) that appears in the Exception that you sent in the screen shot. If that doesn't yield anything, perhaps search the codebase for "new Exception" to try find any place an Exception is being created and sent to Raygun (or put on the context) but not thrown. If you find where this exception is coming from and if it's not being thrown, you'll need to throw it in order to capture the StackTrace.
You may find that the Exception is not being created in your code, but instead coming from a third party library. If this is the case and you can find where it's coming from, you could still throw it within your code where possible.
Alternatively, within the HandleAsync method, you could check if the Exception has a StackTrace or not, and if not, throw/catch it before sending to Raygun. I'd see this as a last resort though as it'll be better to treat the Exception properly at the point where it's created.
Hope that helps, let me know if you have further questions as you go about trying this.
-Jason Fauchelle