eolivelli commented on a change in pull request #9223:
URL: https://github.com/apache/pulsar/pull/9223#discussion_r559473488
##########
File path:
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/AdminResource.java
##########
@@ -321,6 +321,9 @@ protected void validateGlobalNamespaceOwnership(String
property, String namespac
} catch (IllegalArgumentException e) {
throw new RestException(Status.PRECONDITION_FAILED, "Tenant name
or namespace is not valid");
} catch (RestException re) {
+ if (re.getResponse().getStatus() ==
Status.NOT_FOUND.getStatusCode()) {
Review comment:
@jiazhai @aloyszhang
thanks for providing a fix to my issue.
I am not sure I understand why we are converting all of the RestExceptions
to "Namespace does not have any clusters configured"
what about 5xx errors ("Internal server error") ?
probably we should forward to PRECONDITION_FAILED only under specific
circumstances.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]