From 58036ffb521032a77957b6888127bd640922eec6 Mon Sep 17 00:00:00 2001
From: Hailey <me@haileyok.com>
Date: Wed, 25 Sep 2024 15:05:33 -0700
Subject: Filter errors that get sent to Sentry (#5247)

---
 src/view/com/util/UserAvatar.tsx | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

(limited to 'src/view/com/util/UserAvatar.tsx')

diff --git a/src/view/com/util/UserAvatar.tsx b/src/view/com/util/UserAvatar.tsx
index 76d9d1503..2b4376b69 100644
--- a/src/view/com/util/UserAvatar.tsx
+++ b/src/view/com/util/UserAvatar.tsx
@@ -327,7 +327,8 @@ let EditableUserAvatar = ({
 
       onSelectNewAvatar(croppedImage)
     } catch (e: any) {
-      if (!String(e).includes('Canceled')) {
+      // Don't log errors for cancelling selection to sentry on ios or android
+      if (!String(e).toLowerCase().includes('cancel')) {
         logger.error('Failed to crop banner', {error: e})
       }
     }
-- 
cgit 1.4.1

