joshigaurava commented on a change in pull request #7981:
URL: https://github.com/apache/pinot/pull/7981#discussion_r780552843



##########
File path: pinot-controller/src/main/resources/app/utils/PinotMethodUtils.ts
##########
@@ -228,57 +228,60 @@ const getQueryResults = (params, url, checkedOptions) => {
     let queryResponse = null;
     queryResponse = getAsObject(data);
 
+    let errorStr = '';
+    let dataArray = [];
+    let columnList = [];
     // if sql api throws error, handle here
     if(typeof queryResponse === 'string'){
-      return {error: queryResponse};
+      errorStr = queryResponse;
     } else if(queryResponse.exceptions.length){

Review comment:
       `queryResponse` could potentially be null.
   ```
   else if (queryResponse && queryResponse.exceptions && 
queryResponse.exceptions.length) {}
   ```




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