about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEric Bailey <git@esb.lol>2024-01-19 18:13:47 -0600
committerGitHub <noreply@github.com>2024-01-19 16:13:47 -0800
commit9835996d73f9f4b1cdb0c2dfa433972ea203d982 (patch)
tree6edd72a552f2b6bd491ae713a80cfccb4f94b78e
parent89607d90aa3a9e29d50fde8c132187fc3be12e07 (diff)
downloadvoidsky-9835996d73f9f4b1cdb0c2dfa433972ea203d982.tar.zst
Send error boundary exceptions to Sentry (#2573)
-rw-r--r--src/view/com/util/ErrorBoundary.tsx3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/view/com/util/ErrorBoundary.tsx b/src/view/com/util/ErrorBoundary.tsx
index 397588cfb..5ec1d0014 100644
--- a/src/view/com/util/ErrorBoundary.tsx
+++ b/src/view/com/util/ErrorBoundary.tsx
@@ -2,6 +2,7 @@ import React, {Component, ErrorInfo, ReactNode} from 'react'
 import {ErrorScreen} from './error/ErrorScreen'
 import {CenteredView} from './Views'
 import {t} from '@lingui/macro'
+import {logger} from '#/logger'
 
 interface Props {
   children?: ReactNode
@@ -23,7 +24,7 @@ export class ErrorBoundary extends Component<Props, State> {
   }
 
   public componentDidCatch(error: Error, errorInfo: ErrorInfo) {
-    console.error('Uncaught error:', error, errorInfo)
+    logger.error(error, {errorInfo})
   }
 
   public render() {