Report more errors to sentry
Mostly from ErrorView
This commit is contained in:
@@ -18,6 +18,7 @@ import { ReactNode, useCallback, useEffect } from "react";
|
|||||||
import { useLocation } from "react-router-dom";
|
import { useLocation } from "react-router-dom";
|
||||||
import classNames from "classnames";
|
import classNames from "classnames";
|
||||||
import { Trans, useTranslation } from "react-i18next";
|
import { Trans, useTranslation } from "react-i18next";
|
||||||
|
import * as Sentry from "@sentry/react";
|
||||||
|
|
||||||
import { Header, HeaderLogo, LeftNav, RightNav } from "./Header";
|
import { Header, HeaderLogo, LeftNav, RightNav } from "./Header";
|
||||||
import { LinkButton, Button } from "./button";
|
import { LinkButton, Button } from "./button";
|
||||||
@@ -58,6 +59,7 @@ export function ErrorView({ error }: ErrorViewProps) {
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
|
Sentry.captureException(error);
|
||||||
}, [error]);
|
}, [error]);
|
||||||
|
|
||||||
const onReload = useCallback(() => {
|
const onReload = useCallback(() => {
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ limitations under the License.
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { useCallback, useEffect, useReducer, useState } from "react";
|
import { useCallback, useEffect, useReducer, useState } from "react";
|
||||||
|
import * as Sentry from "@sentry/react";
|
||||||
import {
|
import {
|
||||||
GroupCallEvent,
|
GroupCallEvent,
|
||||||
GroupCallState,
|
GroupCallState,
|
||||||
@@ -331,6 +332,7 @@ export function useGroupCall(
|
|||||||
}
|
}
|
||||||
|
|
||||||
function onError(e: GroupCallError): void {
|
function onError(e: GroupCallError): void {
|
||||||
|
Sentry.captureException(e);
|
||||||
if (e.code === GroupCallErrorCode.UnknownDevice) {
|
if (e.code === GroupCallErrorCode.UnknownDevice) {
|
||||||
const unknownDeviceError = e as GroupCallUnknownDeviceError;
|
const unknownDeviceError = e as GroupCallUnknownDeviceError;
|
||||||
addUnencryptedEventUser(unknownDeviceError.userId);
|
addUnencryptedEventUser(unknownDeviceError.userId);
|
||||||
|
|||||||
Reference in New Issue
Block a user