-
-
Notifications
You must be signed in to change notification settings - Fork 214
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
SetTag no longer allows null value #3946
Comments
Thanks for reporting this @Cheesebaron! Any chance you'd be willing to contribute a PR to improve this? |
Sure. I can do that. What should the behavior be? Simply ignoring the null? I assume unsetting the tag when the value is null is not a desired side effect. |
hm that's a fair question. The only risk I see is that code that calls this API with some variable. Didn't intend to be passing null and removing the tag. And that could cause confusion. "I never called UnsetTag how is the tag gone?". But the argument of a single API is al reasonable if we didn't have already UnsetTag in there. |
Package
Sentry
.NET Flavor
.NET
.NET Version
9.0.100
OS
iOS
SDK Version
5.1.0
Self-Hosted Sentry Version
No response
Steps to Reproduce
Some classes in our app don't have Nullable Attributes enabled and in previous versions of Sentry doing something like this was allowed:
However, with 5.1.0 it seems like this is not allowed any more and a ArgumentNullException is thrown:
Expected Result
Not sure what to expect, but sure the nullable attributes explicitly say value cannot be null. But previously it was allowed and I guess ignored internally.
Actual Result
See crash above.
The text was updated successfully, but these errors were encountered: