Jackie-Jiang commented on code in PR #17341:
URL: https://github.com/apache/pinot/pull/17341#discussion_r2604721944


##########
pinot-broker/src/main/java/org/apache/pinot/broker/api/resources/PinotClientRequest.java:
##########
@@ -587,21 +587,35 @@ public static HttpRequesterIdentity 
makeHttpIdentity(org.glassfish.grizzly.http.
    * Generate Response object from the BrokerResponse object with 
'X-Pinot-Error-Code' header value
    *
    * If the query is successful the 'X-Pinot-Error-Code' header value is set 
to -1
-   * otherwise, the first error code of the broker response exception array 
will become the header value
+   * otherwise, the first error code of the broker response exception array 
will become the header value.
    *
-   * @param brokerResponse
+   * By default, returns HTTP 200 OK even for errors. If the request header
+   * 'X-PINOT-HTTP-RESPONSE-CODE-REPRESENT-ERROR' is set to 'true', returns 
appropriate HTTP status

Review Comment:
   Update this



##########
pinot-spi/src/main/java/org/apache/pinot/spi/utils/CommonConstants.java:
##########
@@ -1052,6 +1052,9 @@ public static class Grpc {
     public static final String USE_MSE_TO_FILL_EMPTY_RESPONSE_SCHEMA =
         "pinot.broker.use.mse.to.fill.empty.response.schema";
     public static final boolean DEFAULT_USE_MSE_TO_FILL_EMPTY_RESPONSE_SCHEMA 
= false;
+
+    public static final String PINOT_USE_HTTP_STATUS_FOR_ERRORS_HEADER =

Review Comment:
   ```suggestion
       public static final String USE_HTTP_STATUS_FOR_ERRORS_HEADER =
   ```



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