RobertIndie commented on a change in pull request #14123:
URL: https://github.com/apache/pulsar/pull/14123#discussion_r800266580



##########
File path: 
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/TenantsBase.java
##########
@@ -120,58 +124,34 @@ public void getTenantAdmin(@Suspended final AsyncResponse 
asyncResponse,
     public void createTenant(@Suspended final AsyncResponse asyncResponse,
             @ApiParam(value = "The tenant name") @PathParam("tenant") String 
tenant,
             @ApiParam(value = "TenantInfo") TenantInfoImpl tenantInfo) {
-
-        final String clientAppId = clientAppId();
-        try {
-            validateSuperUserAccess();
-            validatePoliciesReadOnlyAccess();
-            validateClusters(tenantInfo);
-            NamedEntity.checkName(tenant);
-        } catch (IllegalArgumentException e) {
-            log.warn("[{}] Failed to create tenant with invalid name {}", 
clientAppId(), tenant, e);
-            asyncResponse.resume(new RestException(Status.PRECONDITION_FAILED, 
"Tenant name is not valid"));

Review comment:
       It seems that we have removed this exception. It will make users 
confused if will just throw the `IllegalArgumentException` without other 
information.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to