gianm commented on PR #14711:
URL: https://github.com/apache/druid/pull/14711#issuecomment-1970076591

   This PR dropped the "Errors" section, which is important due to the note 
about how to detect truncated responses. We need to re-add it in an appropriate 
place.
   
   > #### Errors
   > Errors that occur before the response body is sent will be reported in 
JSON, with an HTTP 500 status code, in the
   same format as [native Druid query 
errors](../querying/querying.md#query-errors). If an error occurs while the 
response body is being sent, at that point it is too late to change the HTTP 
status code or report a JSON error, so the response will
   simply end midstream and an error will be logged by the Druid server that 
was handling your request.
   >
   > As a caller, it is important that you properly handle response truncation. 
This is easy for the `object` and `array`
   formats, since truncated responses will be invalid JSON. For the 
line-oriented formats, you should check the
   trailer they all include: one blank line at the end of the result set. If 
you detect a truncated response, either
   through a JSON parsing error or through a missing trailing newline, you 
should assume the response was not fully
   delivered due to an error.
   
   


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