Fixes an issue where the exception thrown by an async service would not be wrapped in a InvocationTargetException, resulting in the client being unable to determine that the exception occurred within the service itself.
The change is to wrap the exception thrown by the async service in a InvocationTargetException which means the halibut service invoker now always throws a InvocationTargetException for exceptions thrown in sync or async services.
An async service is one that looks like: (e.g. `class AsyncEchoService : IAsyncEchoService { public Task Foo() {await Task.Complete;}})
How to review this PR
Review the two commits separately, the first modifies the test infrastructure and the second adds the fix and tests.
Background
Fixes an issue where the exception thrown by an async service would not be wrapped in a
InvocationTargetException
, resulting in the client being unable to determine that the exception occurred within the service itself.The change is to wrap the exception thrown by the async service in a
InvocationTargetException
which means the halibut service invoker now always throws aInvocationTargetException
for exceptions thrown in sync or async services.An async service is one that looks like: (e.g. `class AsyncEchoService : IAsyncEchoService { public Task Foo() {await Task.Complete;}})
How to review this PR
Review the two commits separately, the first modifies the test infrastructure and the second adds the fix and tests.