Skip to content

Conversation

@sojanmathew
Copy link

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

 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
@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
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)

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"

2 participants