Catch JSON decoding failures

@AeroNotix patch (8f818ce97af51504f5a9f4e64dd37c6bf971d11d) exposed a lack of handling for JSON decode errors. This manifested as cover-up of legitimate query errors.