Closed BrodaNoel closed 11 months ago
Important point: Problem is, not always device seems to be offline (using NetInfo
) and we still have some network issues on requests... I mean, sometimes you get Network request failed
error, and NetInfo
says device is online (because the user left home, WIFI connection lost, request cancelled, but mobile connection still ON).
So... The code to avoid tracking Network issues is even worst. Like...:
try {
const { users } = await actions.users.getSomeUser();
setUser(user);
} catch (error) {
const isDeviceOffline = duix.get('isOffline');
if (!isDeviceOffline && error.message !== 'Network request failed') {
Sentry.Native.captureException(error);
}
}
This issue is stale because it has been open for 60 days with no activity. If there is no activity in the next 7 days, the issue will be closed.
Hold your horses GitHub bot
This issue is stale because it has been open for 60 days with no activity. If there is no activity in the next 7 days, the issue will be closed.
This issue was closed because it has been inactive for 7 days since being marked as stale. Please open a new issue if you believe you are encountering a related problem.
Summary
I have a LOT of code like this in my apps:
It would be REALLY NICE if we could, in some way, provide and option in the
captureException
that will allow me to say "only track this exception if it's not a network problem".Something like this:
What do you think? Feel free to remove it if you think I'm crazy.
Managed or bare workflow? If you have
ios/
orandroid/
directories in your project, the answer is bare!managed
What platform(s) does this occur on?
Android, iOS
SDK Version (managed workflow only)
SDK48
Environment
Not required
Reproducible demo or steps to reproduce from a blank project
Not required