OctopusDeploy / Halibut

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

Passing operation cancelled exceptions up instead of wrapping them in HalibutClientExceptions #582

Closed sburmanoctopus closed 9 months ago

sburmanoctopus commented 9 months ago

[sc-66743]

Background

We want to make it easier to detect an OperationCanceledException from consumers of Halibut (e.g. Tentacle Client).

Results

Before

All exceptions throw within the SecureListeningClient were wrapped in a HalibutClientException. Meaning consumers would have to 'unpack' the exception to see if it was an OperationCanceledException

After

We now throw an exception of the respective OperationCanceledException type instead.

Contractually, this should be fine for the consumer, as Polling tentacles will already throw OperationCanceledExceptions.

How to review this PR

Quality :heavy_check_mark:

Pre-requisites

shortcut-integration[bot] commented 9 months ago

This pull request has been linked to Shortcut Story #66743: Revisit Halibut and Tentacle Client cancellation exceptions to simplify the code.