diff --git a/components/device-mgt/io.entgra.device.mgt.core.device.mgt.core/src/main/java/io/entgra/device/mgt/core/device/mgt/core/metadata/mgt/DeviceStatusManagementServiceImpl.java b/components/device-mgt/io.entgra.device.mgt.core.device.mgt.core/src/main/java/io/entgra/device/mgt/core/device/mgt/core/metadata/mgt/DeviceStatusManagementServiceImpl.java index 3d4d557a79..956e65d851 100644 --- a/components/device-mgt/io.entgra.device.mgt.core.device.mgt.core/src/main/java/io/entgra/device/mgt/core/device/mgt/core/metadata/mgt/DeviceStatusManagementServiceImpl.java +++ b/components/device-mgt/io.entgra.device.mgt.core.device.mgt.core/src/main/java/io/entgra/device/mgt/core/device/mgt/core/metadata/mgt/DeviceStatusManagementServiceImpl.java @@ -150,7 +150,9 @@ public class DeviceStatusManagementServiceImpl implements DeviceStatusManagement public void updateDefaultDeviceStatusFilters(int tenantId, String deviceType, List deviceStatus) throws MetadataManagementException { try { if (StringUtils.isEmpty(deviceType)) { - throw new IllegalArgumentException("Device type must not be empty or null"); + String msg = "Device type must not be empty or null"; + log.error(msg); + throw new IllegalArgumentException(msg); } MetadataManagementDAOFactory.beginTransaction(); // Retrieve the current device status metadata @@ -267,7 +269,9 @@ public class DeviceStatusManagementServiceImpl implements DeviceStatusManagement @Override public boolean isDeviceStatusValid(String deviceType, String deviceStatus, int tenantId) throws MetadataManagementException { if (StringUtils.isEmpty(deviceType)) { - throw new IllegalArgumentException("Device type must not be empty or null"); + String msg = "Device type must not be empty or null"; + log.error(msg); + throw new IllegalArgumentException(msg); } MetadataManagementService metadataManagementService = new MetadataManagementServiceImpl(); Metadata metadata = metadataManagementService.retrieveMetadata(MetadataConstants.ALLOWED_DEVICE_STATUS_META_KEY);