Skip to content

Commit

Permalink
Merge pull request #391 from bluepilledgreat/version-2.4.0-ignore-aut…
Browse files Browse the repository at this point in the history
…o-update-errors

ignore exceptions while fetching new releases
  • Loading branch information
pizzaboxer authored Jul 16, 2023
2 parents 7caa59e + 3a97ccb commit 6fe62dd
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion Bloxstrap/Bootstrapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,16 @@ private async Task CheckForUpdates()

App.Logger.WriteLine($"[Bootstrapper::CheckForUpdates] Checking for updates...");

var releaseInfo = await Utility.Http.GetJson<GithubRelease>($"https://api.github.com/repos/{App.ProjectRepository}/releases/latest");
GithubRelease? releaseInfo;
try
{
releaseInfo = await Http.GetJson<GithubRelease>($"https://api.github.com/repos/{App.ProjectRepository}/releases/latest");
}
catch (Exception ex)
{
App.Logger.WriteLine($"[Bootstrapper::CheckForUpdates] Failed to fetch releases: {ex}");
return;
}

if (releaseInfo is null || releaseInfo.Assets is null)
{
Expand Down

0 comments on commit 6fe62dd

Please sign in to comment.