vs-streamjsonrpc
vs-streamjsonrpc copied to clipboard
Exception details appear to be dropped after second hop
When an RPC chain exists such that an RPC client invokes a server, which as part of serving that request makes its own RPC call, if the second server throws an exception, the first server sees the remote exception details but the original client only sees the callstack of the intermediate server when it rethrew the exception. Ideally the original client would somehow see stacks of both RPC servers
but the original client only sees the callstack of the intermediate server when it rethrew the exception.
This was also pretty confusing as it made it seem as if the error message we were seeing was associated with the RPC mechanism itself, making us think it was the RPC layer at fault (or our immediate use of it). :)
I'm afraid that will likely always be the case, because within the process the exception is first thrown from JsonRpc.InvokeAsync. You just have to know that like TargetInvocationException, RemoteInvocationException is just a wrapper and means it's the server's fault.