From ecb7ae0d1ad966cad13770705b888d4e847a7ca0 Mon Sep 17 00:00:00 2001 From: Pilzinsel64 Date: Sun, 22 Dec 2024 18:48:30 +0100 Subject: [PATCH] fail silently if url can not be resolved --- .../Features/SharedFunctions.cs | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/ModpackUpdater.Apps.Manager/Features/SharedFunctions.cs b/ModpackUpdater.Apps.Manager/Features/SharedFunctions.cs index 9a41916..6b5b7d0 100644 --- a/ModpackUpdater.Apps.Manager/Features/SharedFunctions.cs +++ b/ModpackUpdater.Apps.Manager/Features/SharedFunctions.cs @@ -123,10 +123,17 @@ internal static class SharedFunctions { if (action.SourceType != SourceType.DirectLink) { - Task.Run(async () => + try { - action.SourceUrl = await factory.ResolveSourceUrl(action); - }).Wait(); + Task.Run(async () => + { + action.SourceUrl = await factory.ResolveSourceUrl(action); + }).Wait(); + } + catch (Exception) + { + // Fail silently + } api.UpdateItem(action); } }