Fix: remove checks of the exists of release when delete app and repo

Signed-off-by: LiHui <andrewli@yunify.com>
This commit is contained in:
LiHui
2021-03-24 18:33:05 +08:00
parent 542eb180c5
commit 9fc0f8d89b
5 changed files with 17 additions and 49 deletions

View File

@@ -20,6 +20,7 @@ import (
"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
"io/ioutil"
apierrors "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/klog"
"kubesphere.io/kubesphere/pkg/api"
@@ -595,7 +596,11 @@ func (h *openpitrixHandler) GetAppVersionFiles(req *restful.Request, resp *restf
if err != nil {
klog.Errorln(err)
handleOpenpitrixError(resp, err)
if apierrors.IsNotFound(err) {
api.HandleNotFound(resp, nil, err)
} else {
api.HandleBadRequest(resp, nil, err)
}
return
}