java-sdk
java-sdk copied to clipboard
Exception from Actor's method is not surfaced to the caller
Describe the proposal
#Expected Behavior
Exception's error message (not stacktrace) from Actor's method is surfaced to the caller. Add details like exception method, line number, exception type and generate an UUID to match the exceptions both on callee as well as caller side.
UPDATE: Throw an exception with a message in the Actor's method. On the client (ActorProxy), try to call that method. The message from the actor's method should also be in the exception in the client.
UPDATE 2: Dapr's .Net SDK uses "X-DaprErrorResponseHeader" to signify that there is an exception serialized at the body. This implementation should be compatible with .Net SDK (both directions, calling into Actor or being called by the client). I recommend using the 1.12.0-rc.2 version of the runtime to validate this as there is a regression in 1.10 and 1.11 still to be patched.
Thanks for this @amulyavarote Could you add more details like the current log and how it looks?
Current logs are quite generic. They should say something like "Actor method invoke exception". We have to add details to this message.
Example of exception details: Dapr.Actors.ActorMethodInvocationException: Remote Actor Method Exception, DETAILS: Exception: NotImplementedException, Method Name: ExceptionExample, Line Number: 14, Exception uuid: d291a006-84d5-42c4-b39e-d6300e9ac38b
Please refer to .NET SDK for a reference on the solution here.
Dapr's .Net SDK uses "X-DaprErrorResponseHeader" to signify that there is an exception serialized at the body. This implementation should be compatible with .Net SDK (both directions, calling into Actor or being called by the client). I recommend using the 1.12.0-rc.2 version of the runtime to validate this as there is a regression in 1.10 and 1.11 still to be patched.
/assign
@Preeb34 Are you working on this? I think the slash in your assign comment needs to be reversed:
/assign
Can you please try it that way and see if it assigns you? Let me know if you need help with anything!
I just updated the comment and sorry about that!
I just updated the comment and sorry about that!
@Preeb34 Can you create a new comment with /assign
for this issue if you are working on it?
/assign