You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am running Akka.net 1.3.0 on .NET Core, and came across the following issue:
I am calling Ask<TResult> from outside of the system and would like to have Ask throw an exception at the call site if the underlying actor responds with new Failure() { Exception = ex } instead of TResult.
This behaviour is described in the docs:
To complete the Task with an exception you need send a Failure message to the sender. This is not done automatically when an actor throws an exception while processing a message.
Upon further inspection of the source code it seems like Status.Failure is used instead internally among Actors to signal an error in processing. If this feature is to be implemented Status.Failure would probably be a better fit.
Hello,
I am running Akka.net 1.3.0 on .NET Core, and came across the following issue:
I am calling
Ask<TResult>
from outside of the system and would like to have Ask throw an exception at the call site if the underlying actor responds withnew Failure() { Exception = ex }
instead ofTResult
.This behaviour is described in the docs:
This feature is however not implemented, if you look at
akka.net/src/core/Akka/Actor/ActorRef.cs
Line 129 in a478c5e
FutureActorRef
sets the result of the task without inspecting whether the message is aFailure
.This then breaks
Ask<TResult>
as the underlying extension method tries to castFailure
toTResult
.Unless I am mistaken the following modification could be used:
I am assuming this is still a behaviour you want to support. If not then the docs should be updated so that they don't put peoples hopes up :)
Many thanks,
Ondrej.
The text was updated successfully, but these errors were encountered: