Hi, Is there a specific reason for throwing exceptions in the REST API without handling them and returning suitable response codes? This is observed in several methods where either the util methods throw exceptions that are not handled in the API method, or the API method directly throws exceptions. IMO most of these scenarios have to be handled by returning a status code and not producing a stack trace.
For example removeDeploymentPolicy method ("/deploymentPolicies/{depolymentPolicyID}") will throw an exception and produce a stack trace when the specified deployment policy ID is not found. Ideally this method should handle the exception and return a 404, since it is not a deal breaking scenario and should not produce noise on the log. Regards, Chamila de Alwis Software Engineer | WSO2 | +94772207163 Blog: code.chamiladealwis.com