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

    https://github.com/apache/stratos/pull/405#discussion_r35650668
  
    --- Diff: 
components/org.apache.stratos.rest.endpoint/src/main/java/org/apache/stratos/rest/endpoint/api/StratosApiV41Utils.java
 ---
    @@ -3127,22 +3128,14 @@ public static void 
updateExistingTenant(org.apache.stratos.common.beans.TenantIn
     
             // filling the first and last name values
             if (StringUtils.isBlank(tenantInfoBean.getFirstName())) {
    -            try {
    -                CommonUtil.validateName(tenantInfoBean.getFirstName(), 
"First Name");
    -            } catch (Exception e) {
    -                String msg = "Invalid first name is provided.";
    -                log.error(msg, e);
    -                throw new RestAPIException(msg, e);
    -            }
    +            String msg = "Invalid first name is provided.";
    +            log.error(msg);
    +            throw new RestAPIException(msg);
             }
             if (StringUtils.isBlank(tenantInfoBean.getLastName())) {
    -            try {
    -                CommonUtil.validateName(tenantInfoBean.getLastName(), 
"Last Name");
    -            } catch (Exception e) {
    -                String msg = "Invalid last name is provided.";
    -                log.error(msg, e);
    -                throw new RestAPIException(msg, e);
    -            }
    +            String msg = "Invalid last name is provided.";
    +            log.error(msg);
    +            throw new RestAPIException(msg);
    --- End diff --
    
    Same issue of throwing RestAPIException for specific errors


---
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