Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add accessors for ChildWorkflowExecutionError fields #1726

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions internal/error.go
Original file line number Diff line number Diff line change
Expand Up @@ -823,6 +823,41 @@ func (e *ChildWorkflowExecutionError) Unwrap() error {
return e.cause
}

// Namespace returns namespace of the child workflow.
func (e *ChildWorkflowExecutionError) Namespace() string {
return e.namespace
}

// WorkflowId returns workflow ID of the child workflow.
func (e *ChildWorkflowExecutionError) WorkflowID() string {
return e.workflowID
}

// RunID returns run ID of the child workflow.
func (e *ChildWorkflowExecutionError) RunID() string {
return e.runID
}

// WorkflowType returns type of the child workflow.
func (e *ChildWorkflowExecutionError) WorkflowType() string {
return e.workflowType
}

// InitiatedEventID returns event ID of the child workflow initiated event.
func (e *ChildWorkflowExecutionError) InitiatedEventID() int64 {
return e.initiatedEventID
}

// StartedEventID returns event ID of the child workflow started event.
func (e *ChildWorkflowExecutionError) StartedEventID() int64 {
return e.startedEventID
}

// RetryState returns details on why child workflow failed.
func (e *ChildWorkflowExecutionError) RetryState() enumspb.RetryState {
return e.retryState
}

// Error implements the error interface.
func (e *NexusOperationError) Error() string {
msg := fmt.Sprintf(
Expand Down
Loading