Turn off background updates after failures and reduce logging #1379
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Thunderstore's Sentry logs are full of reports where the background update fails time and time again. While this is a sort of inverse survivor bias, it's probably safe to assume that once the background updates start failing, they're unlikely to start working again. So turn off the background updates instead.
When the background updates are turned off, an error modal is shown. I couldn't think of a better way to notify the user about the mod manager suddenly going "offline". There's a change that making the background update failure visible to users this way causes a flood of support requests.
If the failure was due to network error or the request timing out, the errors are omitted. Currently these two are number 3 and 4 on Thunderstore's Sentry, and they're just noise since we can't do ~anything about them. Other errors, e.g. related to caching the package list to IndexedDB are still logged in the hopes that we can figure out how to solve at least some of them.