Skip to content

Commit

Permalink
added cluster to fields
Browse files Browse the repository at this point in the history
  • Loading branch information
abhishekj720 committed Apr 23, 2024
1 parent 0c65100 commit 8687fe9
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions service/frontend/wrappers/clusterredirection/policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,13 +195,11 @@ func (policy *selectedOrAllAPIsForwardingRedirectionPolicy) WithDomainIDRedirect
return err
}
if domainEntry.IsDeprecatedOrDeleted() {
//return fmt.Errorf("domain %v is deprecated or deleted", domainEntry.GetInfo().Name)
//return types.NewDomainNotActiveError(domainEntry.GetInfo().Name, domainEntry.GetReplicationConfig().ActiveClusterName)
return types.DomainNotActiveError{
Message: "domain is deprecated.",
DomainName: domainEntry.GetInfo().Name,
CurrentCluster: "",
ActiveCluster: "",
CurrentCluster: policy.currentClusterName,
ActiveCluster: policy.currentClusterName,
}
}
return policy.withRedirect(ctx, domainEntry, apiName, call)
Expand All @@ -214,13 +212,11 @@ func (policy *selectedOrAllAPIsForwardingRedirectionPolicy) WithDomainNameRedire
return err
}
if domainEntry.IsDeprecatedOrDeleted() {
//return fmt.Errorf("domain %v is deprecated or deleted", domainName)

return types.DomainNotActiveError{
Message: "domain is deprecated or deleted",
DomainName: domainName,
CurrentCluster: "",
ActiveCluster: "",
CurrentCluster: policy.currentClusterName,
ActiveCluster: policy.currentClusterName,
}
}
return policy.withRedirect(ctx, domainEntry, apiName, call)
Expand Down

0 comments on commit 8687fe9

Please sign in to comment.