Fix: chart repo response code inconsistent

Response code should consistent whether namespace is existed or not

Signed-off-by: DQ <dengq@vmware.com>
This commit is contained in:
DQ 2020-05-26 15:16:27 +08:00
parent 83bbdca166
commit b9a5f19b13

View File

@ -440,7 +440,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
}