Catch errors parsing JSON