From e1313da2f0a528b13bfe03a7f842180ae76f4355 Mon Sep 17 00:00:00 2001 From: DQ Date: Tue, 26 May 2020 15:16:27 +0800 Subject: [PATCH] Fix: chart repo response code inconsistent Response code should consistent whether namespace is existed or not Signed-off-by: DQ --- src/core/api/chart_repository.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/api/chart_repository.go b/src/core/api/chart_repository.go index 2b39d5f5a..d9d3b096f 100755 --- a/src/core/api/chart_repository.go +++ b/src/core/api/chart_repository.go @@ -442,7 +442,7 @@ func (cra *ChartRepositoryAPI) requireNamespace(namespace string) bool { // Not existing if !existing { - cra.SendBadRequestError(fmt.Errorf("namespace %s is not existing", namespace)) + cra.handleProjectNotFound(namespace) return false }