You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/03/31 12:08:19 UTC

[GitHub] [pulsar] liangyepianzhou commented on a change in pull request #14965: [fix][Transaction] Fix transaction admin redirect get 500 due to getCause

liangyepianzhou commented on a change in pull request #14965:
URL: https://github.com/apache/pulsar/pull/14965#discussion_r839530057



##########
File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/impl/TransactionsBase.java
##########
@@ -504,7 +504,11 @@ protected void internalGetCoordinatorInternalStats(AsyncResponse asyncResponse,
                         "This Broker is not configured with transactionCoordinatorEnabled=true."));
             }
         } catch (Exception e) {
-            asyncResponse.resume(new RestException(e.getCause()));
+            if (e instanceof ExecutionException) {
+                asyncResponse.resume(new RestException(e.getCause()));
+            } else {
+                asyncResponse.resume(new RestException(e));
+            }

Review comment:
       I don`t  know whether this is exception
   ` throw new WebApplicationException(Response.temporaryRedirect(redirect).build());`




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

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org