Skip to content
Open
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
10 changes: 5 additions & 5 deletions temporal/error.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,12 +210,12 @@ func IsApplicationError(err error) bool {
return errors.As(err, &applicationError)
}

// IsWorkflowExecutionAlreadyStartedError return if the err is a
// WorkflowExecutionAlreadyStartedError or if an error in the chain is a
// ChildWorkflowExecutionAlreadyStartedError.
// IsWorkflowExecutionAlreadyStartedError returns true if an error in the chain
// is a WorkflowExecutionAlreadyStartedError or ChildWorkflowExecutionAlreadyStartedError.
func IsWorkflowExecutionAlreadyStartedError(err error) bool {
if _, ok := err.(*serviceerror.WorkflowExecutionAlreadyStarted); ok {
return ok
var alreadyStartedError *serviceerror.WorkflowExecutionAlreadyStarted
if errors.As(err, &alreadyStartedError) {
return true
}
var childError *ChildWorkflowExecutionAlreadyStartedError
return errors.As(err, &childError)
Expand Down