Github user lahirus commented on a diff in the pull request: https://github.com/apache/stratos/pull/353#discussion_r30707196 --- Diff: components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41Utils.java --- @@ -252,10 +251,12 @@ public static void removeCartridge(String cartridgeType) throws RestAPIException if (log.isInfoEnabled()) { log.info(String.format("Successfully removed cartridge: [cartridge-type] %s ", cartridgeType)); } - } catch (Exception e) { - String msg = "Could not remove cartridge " + e.getLocalizedMessage(); - log.error(msg, e); - throw new RestAPIException(e.getMessage(), e); + } catch (RemoteException e) { + throw new RestAPIException(e.getMessage()); + } catch (CloudControllerServiceInvalidCartridgeTypeExceptionException e) { --- End diff -- We should not catch the specific exception at Util class. Catch it in API class and send the response code accordingly.
--- 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. ---