Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

Adds unhandledrejection, that catches all unhandled promise rejection and logs them in callstats.

damencho1f98fbb99fcc
diff --git a/conference.js b/conference.js
index ac89e1f5e2..2bbd5b8a00 100644
--- a/conference.js
+++ b/conference.js
@@ -320,6 +320,16 @@ export default {
if(oldOnErrorHandler)
oldOnErrorHandler(message, source, lineno, colno, error);
};
+
+ var oldOnUnhandledRejection = window.onunhandledrejection;
+ window.onunhandledrejection = function(event) {
+
+ JitsiMeetJS.getGlobalOnErrorHandler(
+ null, null, null, null, event.reason);
+
+ if(oldOnUnhandledRejection)
+ oldOnUnhandledRejection(event);
+ };
}
return JitsiMeetJS.init(config).then(() => {