dotnet-sdk
dotnet-sdk copied to clipboard
Why is second level InnerException from actors not serialized?
Ask your question here
I am using virtual actors and have encountered a situation where the actor throws DaprException
with its InnerException
set to RpcException
with more details on why the actor can't connect to its state store. However, on the caller side I only get ActorMethodInvocationException
with inner exception ActorInvokeException
that breaks the chain and has its InnerException
set to null
. So in the caller I am losing information about what went wrong in the actor.
From what I see in the code, it is done on purpose, see this line in the test case. What was the reason for implementing this behavior? What is the right way of handling and logging exceptions when working with actors? If I lose some information about the errors from the actors, I need to try/catch
and log the errors in all actor methods and possibly propagate them to the caller, but that doesn't seem like a good solution.
Thanks in advance!