Skip to content

Commit

Permalink
Fixes classification of errors in frontend
Browse files Browse the repository at this point in the history
This fixes errors being classified as server errors (HTTP 5XX errors) when a domain is deprecated and correctly reclassifies them as application/ 4XX errors
  • Loading branch information
davidporter-id-au authored May 13, 2024
1 parent ad0c027 commit 3c59510
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions service/frontend/wrappers/clusterredirection/policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ func (policy *selectedOrAllAPIsForwardingRedirectionPolicy) WithDomainIDRedirect
return err
}
if domainEntry.IsDeprecatedOrDeleted() {
return types.DomainNotActiveError{
return &types.DomainNotActiveError{
Message: "domain is deprecated.",
DomainName: domainEntry.GetInfo().Name,
CurrentCluster: policy.currentClusterName,
Expand All @@ -212,7 +212,7 @@ func (policy *selectedOrAllAPIsForwardingRedirectionPolicy) WithDomainNameRedire
return err
}
if domainEntry.IsDeprecatedOrDeleted() {
return types.DomainNotActiveError{
return &types.DomainNotActiveError{
Message: "domain is deprecated or deleted",
DomainName: domainName,
CurrentCluster: policy.currentClusterName,
Expand Down

0 comments on commit 3c59510

Please sign in to comment.