catch json parse errors in console