From 225f0487d9afe2257868213f6dc5d179491d358e Mon Sep 17 00:00:00 2001 From: Robert Long Date: Mon, 15 Nov 2021 12:05:46 -0800 Subject: [PATCH] Capture unknown device errors --- src/Room.jsx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Room.jsx b/src/Room.jsx index 09c22fa..c6e2038 100644 --- a/src/Room.jsx +++ b/src/Room.jsx @@ -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]);