Merge pull request #20365 from p-fruck/fix/api-compat-network-connected

fix(API): Catch ErrNetworkConnected for compat
This commit is contained in:
openshift-ci[bot]
2023-10-18 08:55:31 +00:00
committed by GitHub
3 changed files with 27 additions and 1 deletions

View File

@ -448,6 +448,10 @@ func Connect(w http.ResponseWriter, r *http.Request) {
utils.Error(w, http.StatusNotFound, err)
return
}
if errors.Is(err, define.ErrNetworkConnected) {
utils.Error(w, http.StatusForbidden, err)
return
}
utils.Error(w, http.StatusInternalServerError, err)
return
}