From 545da5ab9af0fd6ed948a6b629c5e6316bef6618 Mon Sep 17 00:00:00 2001 From: Atul Date: Tue, 3 Nov 2020 16:30:34 -0600 Subject: [PATCH 1/2] Add missing docs for timeout exceptions --- docs/querying/querying.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/querying/querying.md b/docs/querying/querying.md index 53e202b7d660..13f561da8983 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,12 @@ 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. 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| From db3b0a4c181ab0960ff8b6cb79019d6fb07090d4 Mon Sep 17 00:00:00 2001 From: Atul Date: Thu, 12 Nov 2020 09:15:40 -0600 Subject: [PATCH 2/2] Add info on auth failures --- docs/querying/querying.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/querying/querying.md b/docs/querying/querying.md index 13f561da8983..8033bdbe09d9 100644 --- a/docs/querying/querying.md +++ b/docs/querying/querying.md @@ -119,6 +119,8 @@ If a query fails, Druid returns a response with an HTTP response code and a JSON ``` 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.