Capture unknown device errors

This commit is contained in:
Robert Long 2021-11-15 12:05:46 -08:00
parent 4c7c3e2cd3
commit 225f0487d9

View File

@ -134,13 +134,20 @@ export function GroupCallView({ client, groupCall, simpleGrid }) {
}
}
function onError(error) {
Sentry.captureException(error);
}
if (groupCall) {
groupCall.on("hangup", onHangup);
groupCall.on("error", onError);
}
return () => {
if (groupCall) {
groupCall.removeListener("hangup", onHangup);
groupCall.removeListener("error", onError);
}
};
}, [groupCall]);