-
-
Notifications
You must be signed in to change notification settings - Fork 203
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add the Refit Exception Content to Sentry #3314
Comments
Hey @TimVerheul , thanks for reaching out. There are so many libraries out there and only so many hours in a day, so I'm not sure if we can add something specifically for Refit However, I'm wondering if we could potentially create something a bit more generic. Maybe some way to configure the @bitsandfoxes thoughts? |
This originates from a discussion on Discord. We have a way that enables users to tailor the exception handling to their need if we lack some sort of integration with any specific framework. The way @TimVerheul managed to unblock himself looks like this
I'm not sure about the benefit of crawling through whatever a framework/library has done to their own exception types and "guess" what bits might be relevant. |
I see I misread your comment. You wanted to check the content on the response bodies. Won't we run into all kinds of PII and therefor opt-in/out related issues when trying to parse and capture the bodies? |
I think having the code written here will help others who might got the same issue as I had. I agree, it's not possible to handle every custom exception for every library. |
Problem Statement
Refit is a populair library for making requests. If an exception occurs, only the Exception Message will be sent to Sentry. The Message is a very broad description (a 400 was received) without containing valuable information.
This information is stored in the Content part of the Exception. Unfortunately, Sentry does not send this.
So when a Refit Exception occurs, you won't know what exactly is causing this.
Solution Brainstorm
As a temporary solution I add my own EventExceptionProcessor but it would be nice to have something like .CatchRefit() to handle this.
The text was updated successfully, but these errors were encountered: