You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by ji...@apache.org on 2022/09/04 13:33:25 UTC
[pulsar] branch branch-2.10 updated: [fix][admin] Fix unWarp Exception when getPoliciesAsync (#17249)
This is an automated email from the ASF dual-hosted git repository.
jianghaiting pushed a commit to branch branch-2.10
in repository https://gitbox.apache.org/repos/asf/pulsar.git
The following commit(s) were added to refs/heads/branch-2.10 by this push:
new c8e46ffca90 [fix][admin] Fix unWarp Exception when getPoliciesAsync (#17249)
c8e46ffca90 is described below
commit c8e46ffca905d5ad45d5252b9d4cc56db1dd0ed8
Author: wenbingshen <ol...@gmail.com>
AuthorDate: Fri Aug 26 10:12:04 2022 +0800
[fix][admin] Fix unWarp Exception when getPoliciesAsync (#17249)
(cherry picked from commit 70661e3db3949f9f6b73e99178c001af5e63dd43)
---
.../main/java/org/apache/pulsar/broker/web/PulsarWebResource.java | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/web/PulsarWebResource.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/web/PulsarWebResource.java
index 0c07ba7a091..fca5b47703e 100644
--- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/web/PulsarWebResource.java
+++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/web/PulsarWebResource.java
@@ -859,10 +859,11 @@ public abstract class PulsarWebResource {
validationFuture.completeExceptionally(new RestException(Status.NOT_FOUND, "Namespace not found"));
}
}).exceptionally(ex -> {
+ Throwable cause = FutureUtil.unwrapCompletionException(ex);
String msg = String.format("Failed to validate global cluster configuration : cluster=%s ns=%s emsg=%s",
- localCluster, namespace, ex.getMessage());
+ localCluster, namespace, cause.getMessage());
log.error(msg);
- validationFuture.completeExceptionally(new RestException(ex));
+ validationFuture.completeExceptionally(new RestException(cause));
return null;
});
return validationFuture;