jadami10 commented on a change in pull request #7892:
URL: https://github.com/apache/pinot/pull/7892#discussion_r771509107



##########
File path: 
pinot-broker/src/main/java/org/apache/pinot/broker/api/resources/PinotBrokerHealthCheck.java
##########
@@ -61,7 +61,9 @@ public String getBrokerHealth() {
       return "OK";
     }
     _brokerMetrics.addMeteredGlobalValue(BrokerMeter.HEALTHCHECK_BAD_CALLS, 1);
-    throw new WebApplicationException(String.format("Pinot broker status is 
%s", status),
-        Response.Status.SERVICE_UNAVAILABLE);
+    Response response =

Review comment:
       I did a bit more digging cause this was bothering me. 
`ControllerApplicationException` uses the same constructor, but it seems it's 
intercepted by Jersey which adds the message to the response. Whereas the 
healthchecks go through jax-rs directly which doesn't build the response with 
the message in it. I can't quite trace how these healthcheck endpoints are 
created and how they're different. If you have a pointer here, that would be 
great.




-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to