Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: ignore net:: errors #1270

Merged
merged 2 commits into from
Nov 29, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ app.on('will-finish-launching', () => {
})

function handleError (err) {
// Ignore network errors that might happen during the
// execution.
if (err.stack.includes('net::')) {
return
}

logger.error(err)
Copy link
Member

@lidel lidel Dec 1, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could we move this logger before the if, so its always logged?
Or are we ignoring this on purpose, due to noise?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was just thinking about ignoring the noise caused by Internet issues...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to be sure I got this right, this is when ipfs-desktop tries to access API that is offline, or are there other uses of this code path?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAIK, it's when we try to access the API and it is offline. However, it shouldn't happen many times.

On previous occasions, this would happen with Auto Updater, when we didn't catch the errors.

criticalErrorDialog(err)
}
Expand Down