Skip to content

feat(sdk): surface operation error and attempt on OperationInfo#673

Merged
ParidelPooya merged 1 commit into
mainfrom
feat/operation-error-attempt-capture
Jul 1, 2026
Merged

feat(sdk): surface operation error and attempt on OperationInfo#673
ParidelPooya merged 1 commit into
mainfrom
feat/operation-error-attempt-capture

Conversation

@ParidelPooya

Copy link
Copy Markdown
Contributor

The checkpointed Operation already carries per-operation Error (on Step/ Callback/Context/ChainedInvoke details) and Attempt (on StepDetails), but toOperationInfo() only mapped Result, so onOperationChange consumers could never see them.

  • Add error?: Error and attempt?: number to the public (experimental) OperationInfo type.
  • Map them in toOperationInfo(): attempt from StepDetails.Attempt, error via DurableOperationError.fromErrorObject() using the same *Details fan-out as result. No new lifecycle hooks required.
  • Workflow Insight plugin now serializes attempt and error { name, message } into OperationRecord (stack trace and errorData intentionally omitted).

result remains available on OperationInfo but is not yet emitted in the record; deferred to content filtering due to unbounded size.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

The checkpointed Operation already carries per-operation Error (on Step/
Callback/Context/ChainedInvoke details) and Attempt (on StepDetails), but
toOperationInfo() only mapped Result, so onOperationChange consumers could
never see them.

- Add error?: Error and attempt?: number to the public (experimental)
  OperationInfo type.
- Map them in toOperationInfo(): attempt from StepDetails.Attempt, error via
  DurableOperationError.fromErrorObject() using the same *Details fan-out as
  result. No new lifecycle hooks required.
- Workflow Insight plugin now serializes attempt and error { name, message }
  into OperationRecord (stack trace and errorData intentionally omitted).

result remains available on OperationInfo but is not yet emitted in the record;
deferred to content filtering due to unbounded size.
@ParidelPooya
ParidelPooya marked this pull request as ready for review July 1, 2026 06:21
@ParidelPooya
ParidelPooya merged commit 08682a0 into main Jul 1, 2026
39 of 41 checks passed
@ParidelPooya
ParidelPooya deleted the feat/operation-error-attempt-capture branch July 1, 2026 06:22
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.

2 participants