aboutsummaryrefslogtreecommitdiffstats
path: root/src/orchestrator/api/projecthandler.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/orchestrator/api/projecthandler.go')
-rw-r--r--src/orchestrator/api/projecthandler.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/orchestrator/api/projecthandler.go b/src/orchestrator/api/projecthandler.go
index 07cd79ce..e88114a1 100644
--- a/src/orchestrator/api/projecthandler.go
+++ b/src/orchestrator/api/projecthandler.go
@@ -167,7 +167,13 @@ func (h projectHandler) deleteHandler(w http.ResponseWriter, r *http.Request) {
vars := mux.Vars(r)
name := vars["project-name"]
- err := h.client.DeleteProject(name)
+ _, err := h.client.GetProject(name)
+ if err != nil {
+ http.Error(w, err.Error(), http.StatusNotFound)
+ return
+ }
+
+ err = h.client.DeleteProject(name)
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
return