Skip to content
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

Fix null ref in aspnet TryGetTraceHeader #1807

Merged
merged 2 commits into from
Jul 24, 2022

Conversation

SimonCropp
Copy link
Contributor

was making it a pain to debug things when i was looking into the client os change

instead of null ref ex in PolyfillExtensions, we can early return

System.NullReferenceException: Object reference not set to an instance of an object.
   at PolyfillExtensions.Split(String str, Char c, StringSplitOptions options) in D:\Code\sentry-dotnet\src\Sentry\Internal\Polyfills.cs:line 23
   at Sentry.SentryTraceHeader.Parse(String value) in D:\Code\sentry-dotnet\src\Sentry\SentryTraceHeader.cs:line 47
   at Sentry.AspNet.HttpContextExtensions.TryGetTraceHeader(NameValueCollection headers) in D:\Code\sentry-dotnet\src\Sentry.AspNet\HttpContextExtensions.cs:line 20

@getsentry getsentry deleted a comment from github-actions bot Jul 24, 2022
@SimonCropp SimonCropp enabled auto-merge (squash) July 24, 2022 04:21
@SimonCropp SimonCropp merged commit f8b3f94 into main Jul 24, 2022
@SimonCropp SimonCropp deleted the fix-null-ref-in-TryGetTraceHeader branch July 24, 2022 06:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants