shauryachats commented on code in PR #16641:
URL: https://github.com/apache/pinot/pull/16641#discussion_r2307958370


##########
pinot-broker/src/main/java/org/apache/pinot/broker/api/resources/PinotClientRequest.java:
##########
@@ -320,14 +325,18 @@ public void processTimeSeriesQueryEngine(@Suspended 
AsyncResponse asyncResponse,
     try {
       try (RequestScope requestContext = 
Tracing.getTracer().createRequestScope()) {
         String queryString = requestCtx.getQueryString();
-        PinotBrokerTimeSeriesResponse response = 
executeTimeSeriesQuery(language, queryString, Map.of(), requestContext,
+        TimeSeriesBlock timeSeriesBlock = executeTimeSeriesQuery(language, 
queryString, Map.of(), requestContext,
           makeHttpIdentity(requestCtx), httpHeaders);
+        PinotBrokerTimeSeriesResponse response = 
PinotBrokerTimeSeriesResponse.fromTimeSeriesBlock(timeSeriesBlock);
         if (response.getErrorType() != null && 
!response.getErrorType().isEmpty()) {
           
asyncResponse.resume(Response.serverError().entity(response).build());
           return;
         }
         asyncResponse.resume(response);
       }
+    } catch (QueryException e) {
+      
asyncResponse.resume(Response.serverError().entity(PinotBrokerTimeSeriesResponse.fromException(e))

Review Comment:
   Ack for the expected query failures.
   
   For the unexpected query failures, I see internal server error codes used 
for all endpoints. Do we want to break that precedence here?



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