Skip to content

馃挜 Fix wrong exception thrown by manual activity heartbeats - #3057

Open
dplyukhin wants to merge 3 commits into
mainfrom
fix-manual-activity-heartbeat-swallowed-exceptions
Open

馃挜 Fix wrong exception thrown by manual activity heartbeats#3057
dplyukhin wants to merge 3 commits into
mainfrom
fix-manual-activity-heartbeat-swallowed-exceptions

Conversation

@dplyukhin

@dplyukhin dplyukhin commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

What was changed

馃挜 BREAKING CHANGE: ManualActivityCompletionClientImpl.recordHeartbeat can now throw ActivityCanceledException/ActivityResetException/ActivityPausedException. Previously, those exceptions were wrapped inside ActivityCompletionFailureException and you had to access them with getCause().

Other changes:

  • ActivityHeartbeatResponse: New wrapper class to reduce code duplication
  • Added ManualActivityCompletionClientImplTest unit test

Why?

ActivityCompletionFailureException is supposed to be mutually exclusive with ActivityCanceledException/ActivityResetException/ActivityPausedException; it shouldn't wrap them.

Checklist

  1. Closes Manual completion client's recordHeartbeat swallows cancellation, reset and pause exceptions聽#2983

  2. How was this tested: Added ManualActivityCompletionClientImplTest unit test to check that thrown exceptions have the expected type.

  1. Any docs updates needed? No

@dplyukhin
dplyukhin requested a review from a team as a code owner September 7, 2026 16:19
@dplyukhin

Copy link
Copy Markdown
Contributor Author

@Quinn-With-Two-Ns this is a reopened version of #2990 with your review comments incorporated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant