Github user anuruddhal commented on a diff in the pull request: https://github.com/apache/stratos/pull/333#discussion_r35619241 --- Diff: components/org.apache.stratos.cli/src/main/java/org/apache/stratos/cli/RestCommandLineService.java --- @@ -501,10 +502,12 @@ public void addTenant(String admin, String firstName, String lastName, String pa + ENDPOINT_ADD_TENANT, jsonString); int responseCode = response.getStatusLine().getStatusCode(); - if (responseCode < 200 || responseCode >= 300) { - CliUtils.printError(response); - } else { + if (responseCode ==201) { System.out.println("Tenant added successfully: " + domain); + } else { + String resultString = CliUtils.getHttpResponseString(response); + String errorMsg= gson.fromJson(resultString, ResponseMessageBean.class).getMessage(); --- End diff -- Fixed in 4db5fcc13b8c61e559c30378320408236f9da1ef
--- 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. ---