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/30 03:43:06 UTC

[GitHub] [pulsar] nodece commented on a change in pull request #14856: [fix][pulsar-admin] Fix pulsar-admin not prompting message when there is a 500 error.

nodece commented on a change in pull request #14856:
URL: https://github.com/apache/pulsar/pull/14856#discussion_r838089638



##########
File path: pulsar-broker/src/main/java/org/apache/pulsar/broker/web/RestException.java
##########
@@ -80,9 +68,9 @@ private static Response getResponse(Throwable t) {
             return e.getResponse();
         } else {
             return Response
-                .status(Status.INTERNAL_SERVER_ERROR)
-                .entity(getExceptionData(t))
-                .type(MediaType.TEXT_PLAIN)
+                .status(Status.INTERNAL_SERVER_ERROR.getStatusCode(), t.getMessage())
+                .entity(new ErrorData(t.getMessage()))

Review comment:
       Should we ignore the stack trace info? 




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