diff --git a/api/http/common.go b/api/http/common.go index 3d0d975f39..b326abecc5 100644 --- a/api/http/common.go +++ b/api/http/common.go @@ -126,8 +126,7 @@ func EncodeError(_ context.Context, err error, w http.ResponseWriter) { switch { case errors.Contains(err, svcerr.ErrAuthorization), errors.Contains(err, svcerr.ErrDomainAuthorization), - errors.Contains(err, svcerr.ErrUnauthorizedPAT), - errors.Contains(err, apiutil.ErrUnsupportedTokenType): + errors.Contains(err, svcerr.ErrUnauthorizedPAT): err = unwrap(err) w.WriteHeader(http.StatusForbidden)