From cffecfaf3a8aa7469a476947aec582ae56b19dd5 Mon Sep 17 00:00:00 2001 From: dunithd Date: Fri, 30 Jun 2017 10:45:40 +0530 Subject: [PATCH] Removing the warning message and changing the HTTP response status code to 400 --- .../carbon/device/mgt/jaxrs/service/impl/GeoServiceImpl.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/GeoServiceImpl.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/GeoServiceImpl.java index 29ea432583..b81df06d52 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/GeoServiceImpl.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/GeoServiceImpl.java @@ -80,8 +80,7 @@ public class GeoServiceImpl implements GeoService { .getDeviceManagementConfig(); if (deviceManagementConfig != null) { if(!deviceManagementConfig.getGeoLocationConfiguration().getPublishLocationOperationResponse()){ - log.warn("Failed to fetch geo location stats since the GeoLocation service has not been enabled."); - return Response.status(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode()).build(); + return Response.status(Response.Status.BAD_REQUEST.getStatusCode()).build(); } } String tableName = "IOT_PER_DEVICE_STREAM_GEO_FUSEDSPATIALEVENT";