Loading go-apps/meep-vis/server/vis.go +14 −0 Original line number Diff line number Diff line Loading @@ -593,6 +593,13 @@ func predictedQosPost(w http.ResponseWriter, r *http.Request) { return } // Set maximum number of routes if len(requestData.Routes) > 10 { log.Error("A maximum of 10 routes are supported in the sandbox") errHandlerProblemDetails(w, "A maximum of 10 routes are supported in the sandbox", http.StatusBadRequest) return } responseData := requestData // Both request and response have same data model for i, route := range requestData.Routes { Loading @@ -608,6 +615,13 @@ func predictedQosPost(w http.ResponseWriter, r *http.Request) { return } // Set maximum number of geo-coordinates for each route if len(route.RouteInfo) > 10 { log.Error("A maximum of 10 geo-coordinates are supported for each route") errHandlerProblemDetails(w, "A maximum of 10 geo-coordinates are supported for each route", http.StatusBadRequest) return } var geocoordinates []gisClient.GeoCoordinate for _, routeInfo := range route.RouteInfo { // empty location attribute will cause a runtime error: invalid memory address or nil pointer dereference Loading Loading
go-apps/meep-vis/server/vis.go +14 −0 Original line number Diff line number Diff line Loading @@ -593,6 +593,13 @@ func predictedQosPost(w http.ResponseWriter, r *http.Request) { return } // Set maximum number of routes if len(requestData.Routes) > 10 { log.Error("A maximum of 10 routes are supported in the sandbox") errHandlerProblemDetails(w, "A maximum of 10 routes are supported in the sandbox", http.StatusBadRequest) return } responseData := requestData // Both request and response have same data model for i, route := range requestData.Routes { Loading @@ -608,6 +615,13 @@ func predictedQosPost(w http.ResponseWriter, r *http.Request) { return } // Set maximum number of geo-coordinates for each route if len(route.RouteInfo) > 10 { log.Error("A maximum of 10 geo-coordinates are supported for each route") errHandlerProblemDetails(w, "A maximum of 10 geo-coordinates are supported for each route", http.StatusBadRequest) return } var geocoordinates []gisClient.GeoCoordinate for _, routeInfo := range route.RouteInfo { // empty location attribute will cause a runtime error: invalid memory address or nil pointer dereference Loading