Wrap JSON.parse into try/catch to handle response with html contents