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

Exception serialization does not handler Empty exception message. #1066

Closed
cijothomas opened this issue Jan 19, 2019 · 3 comments
Closed

Exception serialization does not handler Empty exception message. #1066

cijothomas opened this issue Jan 19, 2019 · 3 comments

Comments

@cijothomas
Copy link
Contributor

cijothomas commented Jan 19, 2019

Oringally reported:microsoft/ApplicationInsights-aspnetcore#823
Application Insights Rejecting Exceptions with empty Message

Repro:
TelemetryClient tc = new TelemetryClient();
tc.Context.InstrumentationKey = "validikey";
tc.TrackException(new Exception(""));
tc.Flush();

Response from backend:
Field 'message' on type 'ExceptionDetails' is required but missing or empty. Expected: string, Actual: undefined

// The following gets mesage automatically populated, but passing "" or string.empty breaks it.
var ex = new Exception();
tc.TrackException(ex);

Fix would be to modify Exception sanitization to handle this properly.

@github-actions
Copy link

This issue is stale because it has been open 300 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@kristofferjalen
Copy link

This bug is still there.

@NeilMountford
Copy link
Contributor

This is still an issue, I've created a PR with a unit test: #2857 that will hopefully solve it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants