eolivelli commented on a change in pull request #8818:
URL: https://github.com/apache/pulsar/pull/8818#discussion_r548919714
##########
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.")) {
Review comment:
Please do not rely on strings, can we test the actual class?
----------------------------------------------------------------
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]