diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.api/src/main/java/org/wso2/carbon/device/application/mgt/publisher/api/services/ApplicationManagementAPI.java b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.api/src/main/java/org/wso2/carbon/device/application/mgt/publisher/api/services/ApplicationManagementAPI.java index 80629b310b..c22132d513 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.api/src/main/java/org/wso2/carbon/device/application/mgt/publisher/api/services/ApplicationManagementAPI.java +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.api/src/main/java/org/wso2/carbon/device/application/mgt/publisher/api/services/ApplicationManagementAPI.java @@ -260,10 +260,9 @@ public interface ApplicationManagementAPI { message = "OK. \n Successfully created an application.", response = Application.class), @ApiResponse( - code = 304, - message = "Not Modified. \n " + - "Empty body because the client already has the latest version of the requested " - + "resource."), + code = 400, + message = "Bad Request. \n " + + "Application creating payload contains unacceptable or vulnerable data"), @ApiResponse( code = 500, message = "Internal Server Error. \n Error occurred while getting the application list.", diff --git a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.api/src/main/java/org/wso2/carbon/device/application/mgt/publisher/api/services/impl/ApplicationManagementAPIImpl.java b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.api/src/main/java/org/wso2/carbon/device/application/mgt/publisher/api/services/impl/ApplicationManagementAPIImpl.java index a96b408719..6ecd44cba7 100644 --- a/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.api/src/main/java/org/wso2/carbon/device/application/mgt/publisher/api/services/impl/ApplicationManagementAPIImpl.java +++ b/components/application-mgt/org.wso2.carbon.device.application.mgt.publisher.api/src/main/java/org/wso2/carbon/device/application/mgt/publisher/api/services/impl/ApplicationManagementAPIImpl.java @@ -98,8 +98,6 @@ public class ApplicationManagementAPIImpl implements ApplicationManagementAPI { } return Response.status(Response.Status.OK).entity(application).build(); - } catch (NotFoundException e) { - return Response.status(Response.Status.NOT_FOUND).build(); } catch (ApplicationManagementException e) { log.error("Error occurred while getting application with the uuid " + appType, e); return APIUtil.getResponse(e, Response.Status.INTERNAL_SERVER_ERROR);