diff --git a/server/server.go b/server/server.go index a3d8d55..7b1e1cb 100644 --- a/server/server.go +++ b/server/server.go @@ -110,6 +110,10 @@ func Server() error { // access container resp, err := docker.BuildRunContainer(PortsInt, GPU, ContainerName) + if err != nil { + c.String(http.StatusInternalServerError, fmt.Sprintf("error: %s", err)) + } + if ProxyIpAddr.Ipv4 != "" { err := frp.StartFRPCDockerContainer(ProxyIpAddr.Ipv4, ProxyIpAddr.ProxyPort, resp) if err != nil { @@ -117,10 +121,6 @@ func Server() error { } } - if err != nil { - c.String(http.StatusInternalServerError, fmt.Sprintf("error: %s", err)) - } - c.JSON(http.StatusOK, resp) })