ankitsultana commented on code in PR #16641:
URL: https://github.com/apache/pinot/pull/16641#discussion_r2291840691
##########
pinot-broker/src/main/java/org/apache/pinot/broker/requesthandler/TimeSeriesRequestHandler.java:
##########
@@ -119,31 +119,27 @@ public PinotBrokerTimeSeriesResponse
handleTimeSeriesRequest(String lang, String
try {
timeSeriesRequest = buildRangeTimeSeriesRequest(lang,
rawQueryParamString, queryParams);
} catch (URISyntaxException e) {
- return PinotBrokerTimeSeriesResponse.newErrorResponse("BAD_REQUEST",
"Error building RangeTimeSeriesRequest");
+ throw new RuntimeException("Error building RangeTimeSeriesRequest", e);
Review Comment:
anti-pattern: we are throwing RuntimeException which is then caught below
and re-wrapped into another RuntimeException.
--
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]