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 ca60d6fa615..03995c336c0 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;