druidry icon indicating copy to clipboard operation
druidry copied to clipboard

Druidry should correctly handle Druid query errors

Open bbecker-te opened this issue 3 years ago • 0 comments

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.

bbecker-te avatar Oct 12 '21 13:10 bbecker-te