From 478546433290ac9a0c125637edd016918c8c3db3 Mon Sep 17 00:00:00 2001 From: Matt <97983689+bluepilledgreat@users.noreply.github.com> Date: Thu, 23 Jan 2025 22:55:37 +0000 Subject: [PATCH] fix client-version fallback not handling channel errors (#4378) --- Bloxstrap/RobloxInterfaces/Deployment.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Bloxstrap/RobloxInterfaces/Deployment.cs b/Bloxstrap/RobloxInterfaces/Deployment.cs index da88c14c..5be0d21c 100644 --- a/Bloxstrap/RobloxInterfaces/Deployment.cs +++ b/Bloxstrap/RobloxInterfaces/Deployment.cs @@ -176,7 +176,15 @@ public static async Task GetInfo(string? channel = null) App.Logger.WriteLine(LOG_IDENT, "Failed to contact clientsettingscdn! Falling back to clientsettings..."); App.Logger.WriteException(LOG_IDENT, ex); - clientVersion = await Http.GetJson("https://clientsettings.roblox.com" + path); + try + { + clientVersion = await Http.GetJson("https://clientsettings.roblox.com" + path); + } + catch (HttpRequestException httpEx) + when (!isDefaultChannel && BadChannelCodes.Contains(httpEx.StatusCode)) + { + throw new InvalidChannelException(httpEx.StatusCode); + } } // check if channel is behind LIVE