ignore exceptions while checking new releases

This commit is contained in:
bluepilledgreat 2023-07-16 16:17:56 +01:00
parent 8a4adaec3a
commit 3a97ccb552

View File

@ -563,7 +563,16 @@ namespace Bloxstrap
App.Logger.WriteLine($"[Bootstrapper::CheckForUpdates] Checking for updates..."); 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) if (releaseInfo is null || releaseInfo.Assets is null)
{ {