update to build the correct container and also fix a few bugs
diff --git a/provisioner/handlers.go b/provisioner/handlers.go
index b915674..2ac421d 100644
--- a/provisioner/handlers.go
+++ b/provisioner/handlers.go
@@ -4,7 +4,6 @@
"bufio"
"encoding/json"
"github.com/gorilla/mux"
- "log"
"net/http"
"strings"
)
@@ -48,14 +47,15 @@
var info RequestInfo
decoder := json.NewDecoder(r.Body)
defer r.Body.Close()
- if err := decoder.Decode(&info); err != nil || !c.validateData(&info) {
- log.Printf("ERROR: %v", err)
+ if err := decoder.Decode(&info); err != nil {
+ http.Error(w, err.Error(), http.StatusBadRequest)
+ return
+ }
+ if !c.validateData(&info) {
w.WriteHeader(http.StatusBadRequest)
return
}
- log.Printf("GOT: %v", info)
-
role, err := c.GetRole(&info)
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)