Skip to content

Conversation

@sojanmathew
Copy link
Contributor

@sojanmathew sojanmathew commented Oct 21, 2025

Unhandled exceptions previously lacked specific failure causes, making error categorization difficult in observability tools.
Add WORKFLOW_TASK_FAILED_CAUSE_WORKFLOW_WORKER_UNHANDLED_FAILURE as
default cause for unhandled exceptions, while preserving existing NonDeterministicException behavior. Improves error categorization.

Fixes #2705

What was changed

Add default failure cause WORKFLOW_TASK_FAILED_CAUSE_WORKFLOW_WORKER_UNHANDLED_FAILURE for all exceptions except NonDeterministicException, which retains its existing specific cause.

Why?

This make Java SDK consistent with Go SDK and improves error categorization while maintaining backward compatibility.

Checklist

  1. Closes
    Default task failure cause to "workflow worker unhandled failure" #2705

  2. How was this tested:
    temporal-sdk/src/test/java/io/temporal/internal/replay/ReplayWorkflowTaskHandlerFailureCauseTest.java

  3. Any docs updates needed?
    No

@sojanmathew sojanmathew requested a review from a team as a code owner October 21, 2025 23:56
@Quinn-With-Two-Ns
Copy link
Contributor

Looks good, started a CI run

@sojanmathew
Copy link
Contributor Author

sojanmathew commented Oct 23, 2025

Looks good, started a CI run
CI run fails ( ./gradlew test pass locally) @Quinn-With-Two-Ns any idea ?
https://github.com/temporalio/sdk-java/actions/runs/18700979474/job/53528690731

image

@Quinn-With-Two-Ns
Copy link
Contributor

Hm not sure what happened, there was an issue with github runners around that time so I think that is the likely cause. It is passing now.

To fix the other CI job please see #2686 (comment)

@Sushisource Sushisource force-pushed the issues_2705 branch 2 times, most recently from a96838f to d4ec88f Compare November 6, 2025 23:22
@sojanmathew
Copy link
Contributor Author

Hm not sure what happened, there was an issue with github runners around that time so I think that is the likely cause. It is passing now.

To fix the other CI job please see #2686 (comment)

@Quinn-With-Two-Ns run following commands:

git remote add upstream https://github.com/temporalio/sdk-java.git
git fetch upstream --tags
git push origin --tags

Please help to resolve following check is failing :
Features Integration Tests / features-test / test (pull_request)Failing after 3m
Is it related to git describe --tags command fails in the GitHub Actions environment ?(is it due to shallow clone in CI environment?) Please help

sojanmathew and others added 2 commits November 7, 2025 16:48
 Unhandled exceptions previously lacked specific failure causes, making
  error categorization difficult in observability tools.
  Add WORKFLOW_TASK_FAILED_CAUSE_WORKFLOW_WORKER_UNHANDLED_FAILURE as
  default cause for unhandled exceptions, while preserving existing
  NonDeterministicException behavior. Improves error categorization.

  Fixes temporalio#2705
@Quinn-With-Two-Ns Quinn-With-Two-Ns merged commit 5394310 into temporalio:master Nov 12, 2025
23 of 25 checks passed
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.

Default task failure cause to "workflow worker unhandled failure"

3 participants