diff --git a/src/github.com/getnelson/nelson/blueprint.go b/src/github.com/getnelson/nelson/blueprint.go index e5cc354..6b3c4f3 100644 --- a/src/github.com/getnelson/nelson/blueprint.go +++ b/src/github.com/getnelson/nelson/blueprint.go @@ -100,6 +100,7 @@ func CreateBlueprint(req CreateBlueprintRequest, http *gorequest.SuperAgent, cfg } if r.StatusCode/100 != 2 { + errs = append(errs, errors.New(string(body[:]))) errs = append(errs, errors.New("Unexpectedly recieved a "+strconv.Itoa(r.StatusCode)+" reponse from the server.")) return result, errs } else { diff --git a/src/github.com/getnelson/nelson/main.go b/src/github.com/getnelson/nelson/main.go index 0b5a1f8..2cc71fe 100644 --- a/src/github.com/getnelson/nelson/main.go +++ b/src/github.com/getnelson/nelson/main.go @@ -213,6 +213,7 @@ func main() { r, e := CreateBlueprint(wire, http, cfg) pi.Stop() if e != nil { + PrintTerminalErrors(e) return cli.NewExitError("Unable to create blueprint.", 1) } else { fmt.Println("Successfully created blueprint " + r.Name + "@" + r.Revision + ".") @@ -252,6 +253,7 @@ func main() { r, e := InspectBlueprint(bpName, http, cfg) pi.Stop() if e != nil { + PrintTerminalErrors(e) return cli.NewExitError("Unable to create blueprint.", 1) } else { fmt.Println(r.Template)