Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Fix StorageLimitExceededError being reported to Sentry

Neeraj Guptac1152d699d7f
diff --git a/mobile/apps/photos/lib/core/error-reporting/super_logging.dart b/mobile/apps/photos/lib/core/error-reporting/super_logging.dart
index b1538bc0d6..3ccf2b9ec2 100644
--- a/mobile/apps/photos/lib/core/error-reporting/super_logging.dart
+++ b/mobile/apps/photos/lib/core/error-reporting/super_logging.dart
@@ -239,6 +239,15 @@ class SuperLogging {
options.transport =
TunneledTransport(Uri.parse(appConfig.tunnel!), options);
}
+ // Filter out errors that should not be sent to Sentry
+ options.beforeSend = (SentryEvent event, Hint hint) async {
+ // Check if the error should be skipped
+ final dynamic error = event.throwable;
+ if (error != null && _shouldSkipSentry(error)) {
+ return null; // Returning null drops the event
+ }
+ return event;
+ };
},
appRunner: () => appConfig!.body!(),
);