-
Notifications
You must be signed in to change notification settings - Fork 115
Description
Describe the bug
A FabricException thrown from user code and returned to another service via Remoting has an ErrorCode property of Unknown when observed at the calling service, regardless of its original ErrorCode.
The HResult appears unchanged, as a workaround we will check the HResult as well as the ErrorCode.
To Reproduce
Source of exception - A Service that will be interacted with via SF Remoting
public async Task DoStuff()
{
var ex = new FabricException(FabricErrorCode.OperationTimedOut);
throw ex;
}
Reader of exception - A service with a Polly for retrying transient exceptions:
await policy.ExecuteAsync(async () =>
{
// Assume we already have a proxy
await proxy.DoStuff().ConfigureAwait(false);
}
Expected behavior
ErrorCode is the same at the source and the caller.
Additional context
Observed while developing a retry wrapper around SF Remoting operations for transient SF exceptions and intentionally throwing a FabricException from user code to test the wrapper. Unsure if the same behaviour would be present if the FabricException had originated in the SF internals.