-
I have a flutter mobile app where users may frequently be offline or have a weak network connection. As it's an expected behaviour, I would like to not send these errors to Sentry. Here is how I configured Sentry: await SentryFlutter.init(
(options) {
options
..beforeSend = (event, hint) {
final throwable = event.throwable;
if (throwable is ClientException) return null;
if (throwable case final ServerException e when e.originalException is ClientException) return null;
return event;
}
//...
},
) However, I still see errors such as:
When prompting Seer, it tells me SentryHttpClient captures and sends ClientException.Because Is this true? What's the best way to ignore network errors? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
hey, are you able to share a link to the Sentry event with me at [email protected] |
Beta Was this translation helpful? Give feedback.
Thanks.
Using
beforeSend
here is the correct way.not true, all our events triggered in the Dart/Flutter layer go through the same pipeline and invoke
beforeSend