In certain cases, Druid will return an error message in JSON format in
the body of the HTTP response. However, PyDruid would attempt to
parse the HTTP reason phrase as JSON instead, which wouldn't succeed
as it is something like "Bad Request" and "Server Error". Fix this by
parsing the response body instead.
Also do the same thing for error code 400 ("bad request"), not just
For "bad request" errors, there is usually a clue as to what's
wrong with the query in the error message, so it's worth displaying
the error message instead of discarding it.
In certain cases, Druid will return an error message in JSON format in the body of the HTTP response. However, PyDruid would attempt to parse the HTTP reason phrase as JSON instead, which wouldn't succeed as it is something like "Bad Request" and "Server Error". Fix this by parsing the response body instead.
Also do the same thing for error code 400 ("bad request"), not just