Commit 668ba25d authored by hammad zafar's avatar hammad zafar
Browse files

improve error message in response for better insight

parent 3a27a52a
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -605,8 +605,8 @@ func predictedQosPost(w http.ResponseWriter, r *http.Request) {

			isValidGeoArea := routeInfo.Location.GeoArea != nil && (routeInfo.Location.GeoArea.Latitude == 0 || routeInfo.Location.GeoArea.Longitude == 0)
			if isValidGeoArea {
				log.Error("Mandatory latitude/longitude parameter(s) not present in geoArea")
				http.Error(w, "Mandatory latitude/longitude parameter(s) not present in geoArea", http.StatusBadRequest)
				log.Error("Mandatory latitude/longitude parameter(s) either not present in geoArea or have a zero value")
				http.Error(w, "At least one of the routeInfo structures either does not contain mandatory latitude/longitude parameter(s) in geoArea or have zero value(s).", http.StatusBadRequest)
				return
			}