From 8b2cfcbfe0fecccf4ec58ac085faef24cf50d138 Mon Sep 17 00:00:00 2001 From: inoshperera Date: Thu, 30 Apr 2020 12:37:43 +0530 Subject: [PATCH] minor refactoring --- .../mgt/jaxrs/service/impl/util/RequestValidationUtil.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/util/RequestValidationUtil.java b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/util/RequestValidationUtil.java index ca60d6fa61..03995c336c 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/util/RequestValidationUtil.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.api/src/main/java/org/wso2/carbon/device/mgt/jaxrs/service/impl/util/RequestValidationUtil.java @@ -320,21 +320,21 @@ public class RequestValidationUtil { deviceType; log.error(msg); throw new InputValidationException( - new ErrorResponse.ErrorResponseBuilder().setCode(400l).setMessage(msg).build + new ErrorResponse.ErrorResponseBuilder().setCode(500l).setMessage(msg).build ()); } catch (IllegalAccessException e) { String msg = "Error when accessing an instance of validator related to deviceType " + deviceType; log.error(msg); throw new InputValidationException( - new ErrorResponse.ErrorResponseBuilder().setCode(400l).setMessage(msg).build + new ErrorResponse.ErrorResponseBuilder().setCode(500l).setMessage(msg).build ()); } catch (ClassNotFoundException e) { String msg ="Error when loading an instance of validator related to deviceType " + deviceType; log.error(msg); throw new InputValidationException( - new ErrorResponse.ErrorResponseBuilder().setCode(400l).setMessage(msg).build + new ErrorResponse.ErrorResponseBuilder().setCode(500l).setMessage(msg).build ()); } return null;