Github user pubudu538 commented on a diff in the pull request:
https://github.com/apache/stratos/pull/327#discussion_r30473952
--- Diff:
components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41.java
---
@@ -817,12 +817,18 @@ public Response addApplicationPolicy(
return Response.created(url).entity(new
ResponseMessageBean(ResponseMessageBean.SUCCESS,
String.format("Application policy added successfully:
[application-policy] %s",
applicationPolicy.getId()))).build();
- } catch (RestAPIException e) {
- throw e;
} catch
(AutoscalerServiceInvalidApplicationPolicyExceptionException e) {
return Response.status(Response.Status.BAD_REQUEST).entity(new
ResponseMessageBean(
ResponseMessageBean.ERROR, "Invalid application
policy")).build();
+ }
catch(AutoscalerServiceApplicationPolicyAlreadyExistsExceptionException e){
+ return Response.status(Response.Status.CONFLICT).entity(new
ResponseMessageBean(
--- End diff --
Noted. Thank you!
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---