Skip to content

Include WorkflowType in wrapFailure error message - #2960

Merged
Quinn-With-Two-Ns merged 1 commit into
temporalio:mainfrom
DanielPBak:fix/wrapfailure-workflow-type
Aug 27, 2026
Merged

Include WorkflowType in wrapFailure error message#2960
Quinn-With-Two-Ns merged 1 commit into
temporalio:mainfrom
DanielPBak:fix/wrapfailure-workflow-type

Conversation

@DanielPBak

Copy link
Copy Markdown
Contributor

Summary

  • WorkflowWorker$TaskHandlerImpl.wrapFailure builds a RuntimeException message ("Failure processing workflow task. WorkflowId=..., RunId=..., Attempt=...") when a workflow task fails processing, but omits the workflow type.
  • PollWorkflowTaskQueueResponse (already available on task.getResponse()) carries the workflow type, so this adds WorkflowType= to the message using that existing data — no new lookups or API surface required.
  • This makes the error immediately actionable: today, debugging one of these failures requires a separate lookup (e.g. temporal workflow describe) just to find out which workflow type failed.

Test plan

  • Existing WorkflowWorker/task-handler tests still pass
  • No behavior change other than the added field in the exception message

@DanielPBak
DanielPBak requested a review from a team as a code owner July 22, 2026 21:52
@CLAassistant

CLAassistant commented Jul 22, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

The "Failure processing workflow task" RuntimeException only included
WorkflowId, RunId, and Attempt, forcing anyone debugging a failure to
look up the workflow type separately. PollWorkflowTaskQueueResponse
already carries the workflow type, so include it directly.
@Quinn-With-Two-Ns
Quinn-With-Two-Ns force-pushed the fix/wrapfailure-workflow-type branch from e03dbd7 to fac6f6e Compare August 27, 2026 01:44
@Quinn-With-Two-Ns

Copy link
Copy Markdown
Contributor

I will say, in general, that workflow task failures are generally something that happens to a specific workflow, not a specific workflow type. That being said there are cases like bad code or an NDE where workflow type would be valuable

@Quinn-With-Two-Ns
Quinn-With-Two-Ns enabled auto-merge (squash) August 27, 2026 01:52
@Quinn-With-Two-Ns
Quinn-With-Two-Ns merged commit b7dd8c8 into temporalio:main Aug 27, 2026
16 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.

3 participants