From 21e3c4b39ca051d62345e32b22b844245fb5efb5 Mon Sep 17 00:00:00 2001 From: Atul Mohan Date: Fri, 13 Nov 2020 08:45:40 -0600 Subject: [PATCH] Add missing docs for timeout exceptions (#10554) * Add missing docs for timeout exceptions * Add info on auth failures --- docs/querying/querying.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/querying/querying.md b/docs/querying/querying.md index 53e202b7d66..8033bdbe09d 100644 --- a/docs/querying/querying.md +++ b/docs/querying/querying.md @@ -107,7 +107,7 @@ curl -X DELETE "http://host:port/druid/v2/abc123" ## Query errors -If a query fails, you will get an HTTP 500 response containing a JSON object with the following structure: +If a query fails, Druid returns a response with an HTTP response code and a JSON object with the following structure: ```json { @@ -117,9 +117,14 @@ If a query fails, you will get an HTTP 500 response containing a JSON object wit "host" : "druid1.example.com:8083" } ``` +The HTTP response code returned depends on the type of query failure. For timed out queries, an HTTP 504 response code is returned. + +For [secured](../design/auth.md) Druid clusters, query requests respond with an HTTP 401 response code in case of an authentication failure. For authorization failures, an HTTP 403 response code is returned. If a query request fails due to being limited by the [query scheduler laning configuration](../configuration/index.md#broker), an HTTP 429 response with the same JSON object schema as an error response, but with `errorMessage` of the form: "Total query capacity exceeded" or "Query capacity exceeded for lane 'low'". +For every other type of query failures, an HTTP 500 response code is returned. + The fields in the response are: |field|description|