Improve error handling and reporting for server installation & process boot

This commit is contained in:
Dane Everitt
2021-03-03 20:56:18 -08:00
parent 33f5cb7df4
commit 0919fb2da6
7 changed files with 38 additions and 29 deletions

View File

@@ -2,6 +2,7 @@ package router
import (
"bytes"
"fmt"
"net/http"
"strings"
@@ -38,6 +39,8 @@ func postCreateServer(c *gin.Context) {
buf := bytes.Buffer{}
buf.ReadFrom(c.Request.Body)
fmt.Println(buf.String())
install, err := installer.New(c.Request.Context(), manager, buf.Bytes())
if err != nil {
if installer.IsValidationError(err) {
@@ -47,7 +50,7 @@ func postCreateServer(c *gin.Context) {
return
}
NewTrackedError(err).Abort(c)
// middleware.CaptureAndAbort(c, err)
return
}