poorbarcode commented on code in PR #18194:
URL: https://github.com/apache/pulsar/pull/18194#discussion_r1006365363


##########
pulsar-broker/src/main/java/org/apache/pulsar/broker/web/PulsarWebResource.java:
##########
@@ -875,7 +879,7 @@ public static CompletableFuture<ClusterDataImpl> 
checkLocalOrGetPeerReplicationC
                 if (!allowDeletedNamespace && policies.deleted) {
                     String msg = String.format("Namespace %s is deleted", 
namespace.toString());
                     log.warn(msg);
-                    validationFuture.completeExceptionally(new 
RestException(Status.PRECONDITION_FAILED,
+                    validationFuture.completeExceptionally(new 
RestException(Status.NOT_FOUND,

Review Comment:
   If we return `Status.PRECONDITION_FAILED` here, the error code will same as 
the scenario `if (policies.replication_clusters.isEmpty()`, then we can not 
determine whether the error was caused by `namespace deleted` when calling this 
method



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