jnturton commented on code in PR #2650:
URL: https://github.com/apache/drill/pull/2650#discussion_r973543624
##########
contrib/storage-druid/src/main/java/org/apache/drill/exec/store/druid/rest/DruidQueryClient.java:
##########
@@ -48,20 +48,21 @@ public DruidQueryClient(String brokerURI, RestClient
restClient) {
public DruidScanResponse executeQuery(String query) throws Exception {
logger.debug("Executing Query - {}", query);
- HttpResponse response = restClient.post(queryUrl, query);
- if (response.getStatusLine().getStatusCode() != HttpStatus.SC_OK) {
- throw UserException
- .dataReadError()
- .message("Error executing druid query. HTTP request failed")
- .addContext("Response code",
response.getStatusLine().getStatusCode())
- .addContext("Response message",
response.getStatusLine().getReasonPhrase())
- .build(logger);
- }
+ try (Response response = restClient.post(queryUrl, query)) {
+ if (!response.isSuccessful()) {
+ throw UserException
Review Comment:
@cgivre I wasn't aware of the CustomErrorContext, thanks for pointing it
out. It looks to me like it's an EVF construct that isn't accessible to pre-EVF
plugins like storage-druid. If I've got that right then will we only be able to
start it using in this plugin's error messages when its conversion to EVF
arrives?
--
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]