You'll need a try/catch around that JSON.parse