aparo/pyes — pull request #190 by kumar303 (2012-06-15 01:18:55+00:00)
Title: Show the query if there is a json.dumps exception

We've been hitting a circular reference error a lot when we build incorrect queries (accidentally) that contain objects that are unsafe for JSON. It's a real pain to track them down but as soon as we see the query it's pretty obvious what went wrong. This adds a well formatted query value to any json exceptions for faster debugging.