aloyszhang commented on a change in pull request #8818:
URL: https://github.com/apache/pulsar/pull/8818#discussion_r548823967



##########
File path: 
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/AdminResource.java
##########
@@ -702,6 +702,11 @@ protected static PartitionedTopicMetadata 
fetchPartitionedTopicMetadata(PulsarSe
             return 
pulsar.getBrokerService().fetchPartitionedTopicMetadataAsync(topicName).get();
         } catch (Exception e) {
             if (e.getCause() instanceof RestException) {
+                // Since CompletableFuture wrappers exception, so we will lost 
the Status
+                // rebuild the Status if exception message contains "Topic not 
exist."
+                if (e.getCause().getMessage().contains("Topic not exist.")) {
+                    throw new 
org.apache.pulsar.broker.web.RestException(Response.Status.NOT_FOUND, "Topic 
not exist.");
+                }

Review comment:
       I'll check this PR and push later.




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


Reply via email to