-
Notifications
You must be signed in to change notification settings - Fork 391
UnhandledExceptionEvent.ToString() Throws NotSupportedException #1362
Copy link
Copy link
Closed
Description
Which version of Duende IdentityServer are you using?
6.3.2
Which version of .NET are you using?
NET 6
Describe the bug
- System.Text.Json can't serialize exceptions. System.Text.Json - can't serialize exception dotnet/runtime#43026. It will refuse to serialize the contained IntPtr
- UnhandledExceptionEvent contains an exception https://github.com/DuendeSoftware/IdentityServer/blob/main/src/IdentityServer/Events/UnhandledExceptionEvent.cs#L44
- Event.ToString() calls LogSerializer.Serialize(this) which internally uses System.Text.Json https://github.com/DuendeSoftware/IdentityServer/blob/main/src/IdentityServer/Events/Infrastructure/Event.cs#L145
A clear and concise description of what the bug is.
To Reproduce
new UnhandledExceptionEvent(new Exception()).ToString();
should do it, although I haven't exactly tried, because in my case it happens during the OIDC flow (likely because I haven't migrated the database yet).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels