zapr-oss / druidry

Java based Druid Query Generator library
Apache License 2.0
193 stars 86 forks source link

Druidry should correctly handle Druid query errors #175

Open bbecker-te opened 2 years ago

bbecker-te commented 2 years ago

Druidry does not correctly deserialize exception responses from Druid. When there is a Druid error, the response will have a body like {error: “abcdefg”} while an actual Druid response will be an array []. Druidry does not properly deserialize it and throws a MismatchInputException.

We worked around this by handle 400 errors as QueryException in our overridden version of the Druidry Jersey client. That way we can get a more meaningful error description. However, this should really be part of the Druidry library.