Github user lahirus commented on a diff in the pull request:

    https://github.com/apache/stratos/pull/353#discussion_r30725808
  
    --- Diff: 
components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41.java
 ---
    @@ -426,10 +427,21 @@ public Response getCartridgeByFilter(
         @AuthorizationAction("/permission/stratos/cartridges/manage")
         public Response removeCartridge(
                 @PathParam("cartridgeType") String cartridgeType) throws 
RestAPIException {
    -        StratosApiV41Utils.removeCartridge(cartridgeType);
    -        return Response.ok().entity(new 
ResponseMessageBean(ResponseMessageBean.SUCCESS,
    -                String.format("Cartridge deleted successfully: 
[cartridge-type] %s", cartridgeType))).build();
    -
    +        try {
    +            StratosApiV41Utils.removeCartridge(cartridgeType);
    +            return Response.ok().entity(new 
ResponseMessageBean(ResponseMessageBean.SUCCESS,
    +                    String.format("Cartridge deleted successfully: 
[cartridge-type] %s", cartridgeType))).build();
    +        } catch (RemoteException e) {
    --- End diff --
    
    Let's not send BAD_REQUEST for Remote exception. We can throw a 
RestAPIException for that, since it will be an internal server error.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to