Skip to content

Commit

Permalink
DEV-40031
Browse files Browse the repository at this point in the history
  • Loading branch information
DCrow committed Jan 4, 2021
1 parent 4036605 commit 73c4b27
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/app/app.dart
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,13 @@ class App {
final AppConfig config;
final AppData data;

static const List<String> _skipErrors = [
'HttpException',
'SocketException',
'ClientException',
'HandshakeException'
];

static Future<App> init() async {
if (_application != null)
return _application;
Expand Down Expand Up @@ -76,7 +83,7 @@ class App {
options.beforeSend = (sentryLib.SentryEvent event, {dynamic hint}) {
User user = User.currentUser;

return event.copyWith(user: sentryLib.User(
return _skipErrors.any((el) => el == event.exception.type) ? null : event.copyWith(user: sentryLib.User(
id: user.id.toString(),
username: user.username,
email: user.email
Expand Down

0 comments on commit 73c4b27

Please sign in to comment.