From 3c59510a30a927fc7f75c73070b00cfcbdb1ce2a Mon Sep 17 00:00:00 2001 From: David Porter Date: Mon, 13 May 2024 09:02:31 -0700 Subject: [PATCH] Fixes classification of errors in frontend This fixes errors being classified as server errors (HTTP 5XX errors) when a domain is deprecated and correctly reclassifies them as application/ 4XX errors --- service/frontend/wrappers/clusterredirection/policy.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/service/frontend/wrappers/clusterredirection/policy.go b/service/frontend/wrappers/clusterredirection/policy.go index 6557ad3c4f3..cf6a2974554 100644 --- a/service/frontend/wrappers/clusterredirection/policy.go +++ b/service/frontend/wrappers/clusterredirection/policy.go @@ -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, @@ -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,