ENH Handle caching errors more sensibly in JSONQueryEngine