Commit 9148382e authored by Ayesha Ayub's avatar Ayesha Ayub
Browse files

Fix http status codes in MEC013

parent ea52f739
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -2959,7 +2959,7 @@ func distanceSubPut(w http.ResponseWriter, r *http.Request) {
	//Body content not matching parameters
	if subsIdStr != subsIdParamStr {
		log.Error("SubscriptionId in endpoint and in body not matching")
		errHandlerProblemDetails(w, "SubscriptionId in endpoint and in body not matching", http.StatusBadRequest)
		errHandlerProblemDetails(w, "SubscriptionId in endpoint and in body not matching", http.StatusNotFound)
		return
	}

@@ -3418,7 +3418,7 @@ func areaSubPUT(w http.ResponseWriter, r *http.Request) {
	//body content not matching parameters
	if subsIdStr != subsIdParamStr {
		log.Error("SubscriptionId in endpoint and in body not matching")
		errHandlerProblemDetails(w, "SubscriptionId in endpoint and in body not matching", http.StatusBadRequest)
		errHandlerProblemDetails(w, "SubscriptionId in endpoint and in body not matching", http.StatusNotFound)
		return
	}
	areaCircleSub.Links = &Links{
@@ -4146,7 +4146,7 @@ func handlezoneLocationEventSubscriptionPut(w http.ResponseWriter, requestBody m
		//body content not matching parameters
		if subsIdStr != subsIdParamStr {
			log.Error("SubscriptionId in endpoint and in body not matching")
			errHandlerProblemDetails(w, "SubscriptionId in endpoint and in body not matching", http.StatusBadRequest)
			errHandlerProblemDetails(w, "SubscriptionId in endpoint and in body not matching", http.StatusNotFound)
			return
		}
		zoneSubBody.Links = &Links{} // Initialize Links outside the loop
@@ -4258,7 +4258,7 @@ func handlezoneStatusSubscriptionPut(w http.ResponseWriter, requestBody map[stri
		//body content not matching parameters
		if subsIdStr != subsIdParamStr {
			log.Error("SubscriptionId in endpoint and in body not matching")
			errHandlerProblemDetails(w, "SubscriptionId in endpoint and in body not matching", http.StatusBadRequest)
			errHandlerProblemDetails(w, "SubscriptionId in endpoint and in body not matching", http.StatusNotFound)
			return
		}
		zoneStatusSub.Links = &Links{} // Initialize Links outside the loop
@@ -4361,7 +4361,7 @@ func handleUserLocationEventSubscriptionPut(w http.ResponseWriter, requestBody m
		// //Body content not matching parameters
		if subsIdStr != subsIdParamStr {
			log.Error("SubscriptionId in endpoint and in body not matching")
			errHandlerProblemDetails(w, "SubscriptionId in endpoint and in body not matching", http.StatusBadRequest)
			errHandlerProblemDetails(w, "SubscriptionId in endpoint and in body not matching", http.StatusNotFound)
			return
		}
		userSubBody.Links = &Links{
@@ -4464,7 +4464,7 @@ func handleUserLocationPeriodicSubscriptionPut(w http.ResponseWriter, requestBod
		// //Body content not matching parameters
		if subsIdStr != subsIdParamStr {
			log.Error("SubscriptionId in endpoint and in body not matching")
			errHandlerProblemDetails(w, "SubscriptionId in endpoint and in body not matching", http.StatusBadRequest)
			errHandlerProblemDetails(w, "SubscriptionId in endpoint and in body not matching", http.StatusNotFound)
			return
		}
		periodicSub.Links = &Links{