Handle errors in JSON.