Skip to content

Commit

Permalink
Merge pull request #265 from ZIMkaRU/bugfix/prevent-throwing-err-when…
Browse files Browse the repository at this point in the history
…-github-server-cant-respond-for-auto-update

Prevent throwing error when GitHub server can't respond to auto-update requests
  • Loading branch information
ezewer authored Nov 13, 2023
2 parents f8123fd + 0d60aca commit 350bfb2
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/error-manager/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -205,9 +205,16 @@ const initLogger = () => {
if (message.level === 'error') {
const error = message.data.join(os.EOL)

// Don't open a new issue when can't download differentially
// it would fallback to full download
if (/Cannot download differentially/gi.test(error)) {
/*
* Don't open a new issue when:
* - It can't download differentially it would fallback to full download
* - GitHub server can't respond to the auto-update requests
*/
if (
/Cannot download differentially/gi.test(error) ||
/ERR_CONNECTION_REFUSED/gi.test(error) ||
/objects\.githubusercontent\.com/gi.test(error)
) {
return message
}

Expand Down

0 comments on commit 350bfb2

Please sign in to comment.