eolivelli commented on a change in pull request #9928:
URL: https://github.com/apache/pulsar/pull/9928#discussion_r595540600
##########
File path:
pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/ClustersBase.java
##########
@@ -390,7 +391,7 @@ public void deleteCluster(
}
} catch (Exception e) {
log.error("[{}] Failed to get cluster usage {}", clientAppId(),
cluster, e);
- throw new RestException(e);
+ throw new RestException(e instanceof ExecutionException ?
e.getCause() : e);
Review comment:
What about adding an utility function for this line? I see it written
more times
----------------------------------------------------------------
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]