Merge pull request #1288 from vector-im/dbkr/sentry_more_errors

Report more errors to sentry
This commit is contained in:
David Baker
2023-07-24 09:50:49 +01:00
committed by GitHub
2 changed files with 4 additions and 0 deletions

View File

@@ -15,6 +15,7 @@ limitations under the License.
*/
import { useCallback, useEffect, useReducer, useState } from "react";
import * as Sentry from "@sentry/react";
import {
GroupCallEvent,
GroupCallState,
@@ -331,6 +332,7 @@ export function useGroupCall(
}
function onError(e: GroupCallError): void {
Sentry.captureException(e);
if (e.code === GroupCallErrorCode.UnknownDevice) {
const unknownDeviceError = e as GroupCallUnknownDeviceError;
addUnencryptedEventUser(unknownDeviceError.userId);