Make the error boundary work
We had an error boundary at the top level of the app, but it didn't work because it used ErrorPage which tried to use a bunch of things like useLocation() and an error prop. Also it wasn't passed in correctly anyway. This wires it up correctly to a separate view with a button to send debug logs, and also moves it down a few layers so it has access to enough things to be able to send rageshakes. Related: https://github.com/vector-im/element-call/issues/421
This commit is contained in:
parent
6d7f52d2d6
commit
cf309102a2
4 changed files with 90 additions and 30 deletions
|
|
@ -28,9 +28,7 @@ import { Integrations } from "@sentry/tracing";
|
|||
|
||||
import "./index.css";
|
||||
import App from "./App";
|
||||
import { ErrorView } from "./FullScreenView";
|
||||
import { init as initRageshake } from "./settings/rageshake";
|
||||
import { InspectorContextProvider } from "./room/GroupCallInspector";
|
||||
|
||||
initRageshake();
|
||||
|
||||
|
|
@ -104,11 +102,7 @@ Sentry.init({
|
|||
|
||||
ReactDOM.render(
|
||||
<React.StrictMode>
|
||||
<Sentry.ErrorBoundary fallback={ErrorView}>
|
||||
<InspectorContextProvider>
|
||||
<App history={history} />
|
||||
</InspectorContextProvider>
|
||||
</Sentry.ErrorBoundary>
|
||||
<App history={history} />
|
||||
</React.StrictMode>,
|
||||
document.getElementById("root")
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue