druid-io / pydruid

A Python connector for Druid
Other
506 stars 194 forks source link

Parse actual response body for HTTP error #161

Closed haltwise closed 5 years ago

haltwise commented 5 years ago

Before:

           OSError: HTTP Error 500: Internal Server Error 
            Druid Error: Internal Server Error 
            Query is: {
...

After:

           OSError: HTTP Error 500: Internal Server Error 
            Druid Error: {'error': 'Unknown exception', 'errorMessage': "Instantiation of [simple type, class org.apache.druid.query.groupby.GroupByQuery] value failed: querySegmentSpec can't be null", 'errorClass': 'com.fasterxml.jackson.databind.JsonMappingException', 'host': None} 
            Query is: {
...