Skip to content

Commit

Permalink
Fix type assertion panic (#475)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexshtin authored Jun 25, 2020
1 parent 8d3896d commit 679c91e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions service/history/historyEngine.go
Original file line number Diff line number Diff line change
Expand Up @@ -723,8 +723,8 @@ func (e *historyEngineImpl) updateEntityNotExistsErrorOnPassiveCluster(err error
if namespaceCacheErr != nil {
return err // if could not access namespace cache simply return original error
}
namespaceNotActiveErr := namespaceCache.GetNamespaceNotActiveErr().(*serviceerror.NamespaceNotActive)
if namespaceNotActiveErr != nil {

if namespaceNotActiveErr, ok := namespaceCache.GetNamespaceNotActiveErr().(*serviceerror.NamespaceNotActive); ok && namespaceNotActiveErr != nil {
updatedErr := serviceerror.NewNotFound("Workflow execution not found in non-active cluster")
updatedErr.ActiveCluster = namespaceNotActiveErr.ActiveCluster
updatedErr.CurrentCluster = namespaceNotActiveErr.CurrentCluster
Expand Down

0 comments on commit 679c91e

Please sign in to comment.