You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by te...@apache.org on 2022/08/26 02:12:13 UTC
[pulsar] branch master updated: [fix][admin] Fix unWarp Exception when getPoliciesAsync (#17249)
This is an automated email from the ASF dual-hosted git repository.
technoboy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git
The following commit(s) were added to refs/heads/master by this push:
new 70661e3db39 [fix][admin] Fix unWarp Exception when getPoliciesAsync (#17249)
70661e3db39 is described below
commit 70661e3db3949f9f6b73e99178c001af5e63dd43
Author: wenbingshen <ol...@gmail.com>
AuthorDate: Fri Aug 26 10:12:04 2022 +0800
[fix][admin] Fix unWarp Exception when getPoliciesAsync (#17249)
---
.../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 11837927297..85605e201a0 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
@@ -907,10 +907,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;