You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by pe...@apache.org on 2022/03/19 06:02:19 UTC

[pulsar] 05/14: [Broker] Ignore the print the log that the topic does not exist (#13535)

This is an automated email from the ASF dual-hosted git repository.

penghui pushed a commit to branch branch-2.10
in repository https://gitbox.apache.org/repos/asf/pulsar.git

commit f2608cfefce3b8758cbc882c71d11da97d21c2cb
Author: Zixuan Liu <no...@gmail.com>
AuthorDate: Mon Mar 14 22:24:23 2022 +0800

    [Broker] Ignore the print the log that the topic does not exist (#13535)
    
    (cherry picked from commit fe7e55d9f353925a559e88f8ceef2b47b59668e0)
---
 .../org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java    | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
index 8506139..3c3f622 100644
--- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
+++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/PersistentTopicsBase.java
@@ -4554,8 +4554,9 @@ public class PersistentTopicsBase extends AdminResource {
 
     protected void handleTopicPolicyException(String methodName, Throwable thr, AsyncResponse asyncResponse) {
         Throwable cause = thr.getCause();
-        if (!(cause instanceof WebApplicationException)
-                || !(((WebApplicationException) cause).getResponse().getStatus() == 307)) {
+        if (!(cause instanceof WebApplicationException) || !(
+                ((WebApplicationException) cause).getResponse().getStatus() == 307
+                        || ((WebApplicationException) cause).getResponse().getStatus() == 404)) {
             log.error("[{}] Failed to perform {} on topic {}",
                     clientAppId(), methodName, topicName, cause);
         }