Treat throttled remote version file as inflation error #4301
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.
Motivation
If the GitHub API returns a throttling error when we request a remote version file, a warning is logged:
... and the inflation proceeds without the remote version file, which can cause temporary inaccurate metadata if the remote version file has been updated since release.
Other web errors must be treated as warnings in case the URL itself is invalid, but throttling can also happen for valid URLs.
Changes
Now if a request for a remote version file is throttled, it will be treated as an error instead of a warning, so we won't temporarily inflate a mod with partial info.
#4299 did this for repo info requests for SpaceDock mods, but I got sidetracked with all the other stuff and forgot to document it.