Add in some JSON-related error handling.