codelipenghui commented on a change in pull request #13535:
URL: https://github.com/apache/pulsar/pull/13535#discussion_r775844799



##########
File path: 
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
##########
@@ -4363,11 +4363,20 @@ protected void internalHandleResult(AsyncResponse 
asyncResponse,
 
     protected void handleTopicPolicyException(String methodName, Throwable 
thr, AsyncResponse asyncResponse) {
         Throwable cause = thr.getCause();
-        if (!(cause instanceof WebApplicationException)
-                || !(((WebApplicationException) 
cause).getResponse().getStatus() == 307)) {
-            log.error("[{}] Failed to perform {} on topic {}",
-                    clientAppId(), methodName, topicName, cause);
+
+        if (cause instanceof WebApplicationException) {
+            int statusCode = ((WebApplicationException) 
cause).getResponse().getStatus();
+
+            // Print a warning level log when the topic does not exist, 
otherwise print an error level log.

Review comment:
       Nit: the code is very easy to understand, instead, bringing this 
description has a counterproductive effect, because TEMPORARY_REDIRECT will not 
print any logs.




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