Skip to content

fix(client): map service errors of cancel, terminate and describe - #868

Draft
xepozz wants to merge 3 commits into
masterfrom
fix/workflow-stub-service-errors
Draft

xepozz wants to merge 3 commits into
masterfrom
fix/workflow-stub-service-errors

Conversation

@xepozz

@xepozz xepozz commented Nov 29, 2026

Copy link
Copy Markdown
Collaborator

Fixes #269. cancel(), terminate() and describe() of WorkflowStub now map a gRPC NOT_FOUND to WorkflowNotFoundException and other service errors to WorkflowServiceException, like signal() and the Java SDK. The four methods share one call() helper.

Backward compatibility

Code that catches ServiceClientException around these three methods no longer catches it. The original exception is available through getPrevious(). TimeoutException and CanceledException are not changed.

Validation

Three unit tests in WorkflowStubTestCase fail without the change and pass with it.

This change was prepared with AI assistance.

This branch has not been deployed

No deployments
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.

[Feature Request] Use mapWorkflowFailureToException for all workflow methods ?

1 participant