cryptoe commented on code in PR #15176:
URL: https://github.com/apache/druid/pull/15176#discussion_r1365678238


##########
server/src/main/java/org/apache/druid/client/JsonParserIterator.java:
##########
@@ -185,6 +185,12 @@ private void init()
         } else if (nextToken == JsonToken.START_OBJECT) {
           throw convertException(jp.getCodec().readValue(jp, 
QueryException.class));
         } else {
+          if (nextToken == JsonToken.VALUE_STRING) {
+            LOG.error(
+                "Next Token value is of type VALUE_STRING with content [%s], 
not as expected START_ARRAY",
+                jp.getText()
+            );
+          }
           throw convertException(
               new IAE("Next token wasn't a START_ARRAY, was[%s] from url[%s]", 
jp.getCurrentToken(), url)

Review Comment:
   Should we add `jp.getText()` in the exception. That way its a much cleaner 
implementation?
   We should chom jp.getText() to around 200 chars before adding it to the 
message though. 



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