We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 74f32f7 commit 2d5bc99Copy full SHA for 2d5bc99
src/JsonApiDotNetCore/Models/JsonApiDocuments/ErrorMeta.cs
@@ -15,8 +15,15 @@ public sealed class ErrorMeta
15
16
public void IncludeExceptionStackTrace(Exception exception)
17
{
18
- Data["StackTrace"] = exception?.Demystify().ToString()
19
- .Split(new[] {"\n"}, int.MaxValue, StringSplitOptions.RemoveEmptyEntries);
+ if (exception == null)
+ {
20
+ Data.Remove("StackTrace");
21
+ }
22
+ else
23
24
+ Data["StackTrace"] = exception.Demystify().ToString()
25
+ .Split(new[] { "\n" }, int.MaxValue, StringSplitOptions.RemoveEmptyEntries);
26
27
}
28
29
0 commit comments