Skip to content

Commit

Permalink
Return NamespaceNotFound error from RespondWorkflowTaskCompleted hand…
Browse files Browse the repository at this point in the history
…ler (#2810)
  • Loading branch information
alexshtin committed May 6, 2022
1 parent a8a4d27 commit 1f44265
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions service/history/workflowTaskHandler.go
Original file line number Diff line number Diff line change
Expand Up @@ -639,7 +639,7 @@ func (handler *workflowTaskHandlerImpl) handleCommandRequestCancelExternalWorkfl
if attr.GetNamespace() != "" {
targetNamespaceEntry, err := handler.namespaceRegistry.GetNamespace(namespace.Name(attr.GetNamespace()))
if err != nil {
return serviceerror.NewUnavailable(fmt.Sprintf("Unable to cancel workflow across namespace: %v.", attr.GetNamespace()))
return err
}
targetNamespaceID = targetNamespaceEntry.ID()
}
Expand Down Expand Up @@ -816,7 +816,7 @@ func (handler *workflowTaskHandlerImpl) handleCommandStartChildWorkflow(
if attr.GetNamespace() != "" {
targetNamespaceEntry, err := handler.namespaceRegistry.GetNamespace(namespace.Name(attr.GetNamespace()))
if err != nil {
return serviceerror.NewUnavailable(fmt.Sprintf("Unable to schedule child execution across namespace %v.", attr.GetNamespace()))
return err
}
targetNamespace = targetNamespaceEntry.Name()
targetNamespaceID = targetNamespaceEntry.ID()
Expand Down Expand Up @@ -911,7 +911,7 @@ func (handler *workflowTaskHandlerImpl) handleCommandSignalExternalWorkflow(
if attr.GetNamespace() != "" {
targetNamespaceEntry, err := handler.namespaceRegistry.GetNamespace(namespace.Name(attr.GetNamespace()))
if err != nil {
return serviceerror.NewUnavailable(fmt.Sprintf("Unable to signal workflow across namespace: %v.", attr.GetNamespace()))
return err
}
targetNamespaceID = targetNamespaceEntry.ID()
}
Expand Down

0 comments on commit 1f44265

Please sign in to comment.