microsoft / durabletask-java

Java SDK for Durable Functions and the Durable Task Framework
MIT License
13 stars 7 forks source link

update DataConverterException with detailed error message #83

Closed kaibocai closed 1 year ago

kaibocai commented 1 year ago

This PR update DataConverterException with detailed error message to provide more detailed info about the exception.

Before update cx get warning as

WARNING: The orchestrator failed with an unhandled exception: com.microsoft.durabletask.DataConverter$DataConverterException: Failed to deserialize the JSON text to net.yutobo.durablefunc.Person.

After update cx will get

WARNING: The orchestrator failed with an unhandled exception: com.microsoft.durabletask.DataConverter$DataConverterException: Failed to deserialize the JSON text to com.functions.model.Person. Detailed error message: Cannot construct instance of `com.functions.model.Person` (no Creators, like default constructor, exist): cannot deserialize from Object value (no delegate- or property-based Creator) at [Source: (String)"{"name":"kc","age":12}"; line: 1, column: 2]

Resolve https://github.com/microsoft/durabletask-java/issues/78