mirror of
https://github.com/bloxstraplabs/bloxstrap.git
synced 2025-04-21 10:01:27 -07:00
Handle error when channel is not available to user
This commit is contained in:
parent
a099d16072
commit
1ccec2a675
@ -229,10 +229,19 @@ namespace Bloxstrap
|
||||
}
|
||||
catch (HttpResponseException ex)
|
||||
{
|
||||
if (ex.ResponseMessage.StatusCode != HttpStatusCode.NotFound)
|
||||
if (ex.ResponseMessage.StatusCode != HttpStatusCode.NotFound && ex.ResponseMessage.StatusCode != HttpStatusCode.Unauthorized)
|
||||
throw;
|
||||
|
||||
if (ex.ResponseMessage.StatusCode == HttpStatusCode.NotFound)
|
||||
App.Logger.WriteLine(LOG_IDENT, $"Reverting enrolled channel to {RobloxDeployment.DefaultChannel} because a WindowsPlayer build does not exist for {App.Settings.Prop.Channel}");
|
||||
// Janky fix for error 401 ~25/10/2023
|
||||
if (ex.ResponseMessage.StatusCode == HttpStatusCode.Unauthorized)
|
||||
{
|
||||
App.Logger.WriteLine(LOG_IDENT, $"Setting channel to {RobloxDeployment.DefaultChannel} because channel {App.Settings.Prop.Channel} is unavailable to the user.");
|
||||
Controls.ShowMessageBox(
|
||||
$"Release channel {App.Settings.Prop.Channel} is not available to you. It has been reset to {RobloxDeployment.DefaultChannel}.", MessageBoxImage.Information);
|
||||
}
|
||||
|
||||
App.Settings.Prop.Channel = RobloxDeployment.DefaultChannel;
|
||||
clientVersion = await RobloxDeployment.GetInfo(App.Settings.Prop.Channel);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user