Skip to content

Fall back to mirrors on any exception when downloading mods#1117

Merged
SnipUndercover merged 2 commits into
EverestAPI:devfrom
maddie480:fallback-on-auth-exceptions
May 12, 2026
Merged

Fall back to mirrors on any exception when downloading mods#1117
SnipUndercover merged 2 commits into
EverestAPI:devfrom
maddie480:fallback-on-auth-exceptions

Conversation

@maddie480

@maddie480 maddie480 commented May 7, 2026

Copy link
Copy Markdown
Member

Someone in modding_help ran into this

System.Security.Authentication.AuthenticationException: Authentication failed because the remote party sent a TLS alert: 'AccessDenied'.

Turns out they had a security thing blocking files.gamebanana.com, and Everest didn't fall back to a mirror, because this exception is not part of the caught exceptions (TimeoutException, WebException or IOException).

This PR makes Everest fall back to a mirror on any exception like Olympus, most errors come from networking anyway.

Comment thread Celeste.Mod.mm/Mod/UI/AutoModUpdater.cs Outdated

break; // out of the loop
} catch (Exception e) when (e is WebException or TimeoutException or IOException) {
} catch (Exception e) when (e is WebException or TimeoutException or IOException or AuthenticationException) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The actual exception is a System.AggregateException that has an inner System.Net.Http.HttpRequestException, which then includes an System.Security.Authentication.AuthenticationException.

(which finally includes an System.ComponentModel.Win32Exception.)
Suggested change
} catch (Exception e) when (e is WebException or TimeoutException or IOException or AuthenticationException) {
} catch (Exception e) when (e is WebException or TimeoutException or IOException or AggregateException { InnerException: HttpRequestException }) {

@maddie480-bot maddie480-bot added the 2: changes requested This PR cannot be merged because changes were requested (bot-managed) label May 7, 2026
@maddie480 maddie480 changed the title Fall back to mirrors on AuthenticationExceptions Fall back to mirrors on any exception when downloading mods May 7, 2026
@maddie480 maddie480 requested a review from SnipUndercover May 7, 2026 21:36
@maddie480-bot maddie480-bot added 1: review needed This PR needs 2 approvals to be merged (bot-managed) and removed 2: changes requested This PR cannot be merged because changes were requested (bot-managed) labels May 8, 2026

@microlith57 microlith57 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

no don't fall back on the mirror, that's fragile, you might break it

@maddie480-bot

Copy link
Copy Markdown
Member

The pull request was approved and entered the 3-day last-call window.
If no further reviews happen, it will end on May 12, 2026, 12:00 AM UTC, after which the pull request will be able to be merged.

@maddie480-bot maddie480-bot added 3: last call window This PR was approved, and is in the 5-day last-call window before getting merged (bot-managed) and removed 1: review needed This PR needs 2 approvals to be merged (bot-managed) labels May 9, 2026
@maddie480-bot

Copy link
Copy Markdown
Member

The last-call window for this pull request ended. It can now be merged if no blockers were brought up.

@maddie480-bot maddie480-bot added 4: ready to merge This PR was approved and the last-call window is over (bot-managed) and removed 3: last call window This PR was approved, and is in the 5-day last-call window before getting merged (bot-managed) labels May 12, 2026
@SnipUndercover SnipUndercover merged commit 332161f into EverestAPI:dev May 12, 2026
3 checks passed
@maddie480 maddie480 deleted the fallback-on-auth-exceptions branch May 30, 2026 19:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4: ready to merge This PR was approved and the last-call window is over (bot-managed)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants