OctopusDeploy / Halibut

| Public | A secure communication stack for .NET using JSON-RPC over SSL.
Other
12 stars 44 forks source link

Setting the InnerException of HalibutClientException on service errors #531

Closed Discolai closed 6 months ago

Discolai commented 10 months ago

Hi, we are running some existing application code inside Halibut services remotely. We catch specific exceptions in order to cleanup during failures.

You have done a great job passing over the stacktrace of remote exceptions with HalibutClientException. However, it does not expose the actual InnerException which makes it hard for us to do automatic handling.

Would it be possible for you to extend the ServerError class with an InnerException property so that it can be passed on to the client?

Discolai commented 10 months ago

I realize this will lead to serialization issues for unknown exceptions not present in the TypeRegistry Could this be made opt in by manually adding allowed exceptions to the TypeRegistry and continue as usual for any exception which is not allowed?

Discolai commented 6 months ago

We ended up doing our own exception handling on top of the protocol