From 9c26fe58024392b7d2101e41c52a5ee7e18e1950 Mon Sep 17 00:00:00 2001 From: Avishka-Shamendra Date: Wed, 17 Apr 2024 14:15:48 +0530 Subject: [PATCH] Improve error handling and logging --- .../java/org/wso2/carbon/rest/api/service/RestApiAdmin.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/mediation-admin/org.wso2.carbon.rest.api/src/main/java/org/wso2/carbon/rest/api/service/RestApiAdmin.java b/components/mediation-admin/org.wso2.carbon.rest.api/src/main/java/org/wso2/carbon/rest/api/service/RestApiAdmin.java index 74010424e2..22902b7b8f 100644 --- a/components/mediation-admin/org.wso2.carbon.rest.api/src/main/java/org/wso2/carbon/rest/api/service/RestApiAdmin.java +++ b/components/mediation-admin/org.wso2.carbon.rest.api/src/main/java/org/wso2/carbon/rest/api/service/RestApiAdmin.java @@ -887,7 +887,7 @@ private void addApi(OMElement apiElement, String fileName, boolean updateMode) t String errMsg = "Error trying to add the API to the ESB " + "configuration : " + api.getName(); api.destroy(); - try{ + try { getSynapseConfiguration().removeAPI(api.getName()); if (getAxisConfig().getService(api.getName()) != null) { getAxisConfig().removeService(api.getName());