[Bug Report]: MicrosoftLogHandler is serializing exceptions using System.Text.Json #537
Closed
1 task done
Labels
bug
Something isn't working
Prerequisites
Description
MicrosoftLogHandler is using System.Text.Json to serialize data, sometimes this data can be an Exception like in the method below
Which will lead to a
System.NotSupportedException: Serialization and deserialization of 'System.IntPtr' instances are not supported
since System.Text.Json doesn't support serialization of exceptions, links to some microsoft discussions dotnet/runtime#43026 (comment) dotnet/runtime#43482Steps to reproduce
Every step that will lead to trigger microsoft logger with an exception as Data
Expected behavior
Serialize data even if its an exception
Actual behavior
Throws a `System.NotSupportedException: Serialization and deserialization of 'System.IntPtr' exception
KafkaFlow version
3.0.3
The text was updated successfully, but these errors were encountered: