summaryrefslogtreecommitdiffstats
path: root/src/orchestrator
diff options
context:
space:
mode:
Diffstat (limited to 'src/orchestrator')
-rw-r--r--src/orchestrator/api/composite_app_handler.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/orchestrator/api/composite_app_handler.go b/src/orchestrator/api/composite_app_handler.go
index d531b28d..761d60b9 100644
--- a/src/orchestrator/api/composite_app_handler.go
+++ b/src/orchestrator/api/composite_app_handler.go
@@ -130,7 +130,12 @@ func (h compositeAppHandler) deleteHandler(w http.ResponseWriter, r *http.Reques
version := vars["version"]
projectName := vars["project-name"]
- err := h.client.DeleteCompositeApp(name, version, projectName)
+ _, err := h.client.GetCompositeApp(name, version, projectName)
+ if err != nil {
+ http.Error(w, err.Error(), http.StatusNotFound)
+ return
+ }
+ err = h.client.DeleteCompositeApp(name, version, projectName)
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
return