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/operation/change/status/task/OperationConfigurationService.java b/components/device-mgt/io.entgra.device.mgt.core.device.mgt.core/src/main/java/io/entgra/device/mgt/core/device/mgt/core/operation/change/status/task/OperationConfigurationService.java index 96c59ad4fc..fe7baac9fb 100644 --- a/components/device-mgt/io.entgra.device.mgt.core.device.mgt.core/src/main/java/io/entgra/device/mgt/core/device/mgt/core/operation/change/status/task/OperationConfigurationService.java +++ b/components/device-mgt/io.entgra.device.mgt.core.device.mgt.core/src/main/java/io/entgra/device/mgt/core/device/mgt/core/operation/change/status/task/OperationConfigurationService.java @@ -49,7 +49,7 @@ public class OperationConfigurationService { } catch (MetadataManagementException e) { String msg = "Error occurred while retrieving operation configuration"; log.error(msg, e); - throw new OperationConfigException(e); + throw new OperationConfigException(msg, e); } if (metadata != null) { return gson.fromJson(metadata.getMetaValue(), OperationConfig.class); @@ -71,11 +71,11 @@ public class OperationConfigurationService { } catch (MetadataManagementException e) { String msg = "Error occurred while adding operation configuration"; log.error(msg, e); - throw new OperationConfigException(e); + throw new OperationConfigException(msg, e); } catch (MetadataKeyAlreadyExistsException e) { String msg = "Operation configuration already exists"; log.error(msg, e); - throw new OperationConfigAlreadyExistsException(e); + throw new OperationConfigAlreadyExistsException(msg, e); } } @@ -91,7 +91,7 @@ public class OperationConfigurationService { } catch (MetadataManagementException e) { String msg = "Error occurred while updating operation configuration"; log.error(msg, e); - throw new OperationConfigException(e); + throw new OperationConfigException(msg, e); } } @@ -102,11 +102,11 @@ public class OperationConfigurationService { } catch (MetadataManagementException e) { String msg = "Error occurred while deleting operation configuration"; log.error(msg, e); - throw new OperationConfigException(e); + throw new OperationConfigException(msg, e); } catch (MetadataKeyNotFoundException e) { String msg = "Operation configuration already exists"; log.error(msg, e); - throw new OperationConfigNotFoundException(e); + throw new OperationConfigNotFoundException(msg, e); } }