added a missing try catch around a JSON.parse