Catch JSON decoding failures

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