feat(analytics): shield sending analytics events

Any failure in analytics should not prevent the natural flow of the code. Shield
the function by catching and logging any exception.
pull/2363/head jitsi-meet_2752
Saúl Ibarra Corretgé 7 years ago committed by Paweł Domas
parent 7ad875e735
commit b7f950f5f7
  1. 6
      react/features/analytics/functions.js

@ -16,7 +16,11 @@ const logger = require('jitsi-meet-logger').getLogger(__filename);
* @returns {void}
*/
export function sendAnalytics(event: Object) {
analytics.sendEvent(event);
try {
analytics.sendEvent(event);
} catch (e) {
logger.warn(`Error sending analytics event: ${e}`);
}
}
/**

Loading…
Cancel
Save