diff --git a/Tranga/MangaConnectors/ChromiumDownloadClient.cs b/Tranga/MangaConnectors/ChromiumDownloadClient.cs index 78a1534..cf8f1fd 100644 --- a/Tranga/MangaConnectors/ChromiumDownloadClient.cs +++ b/Tranga/MangaConnectors/ChromiumDownloadClient.cs @@ -62,8 +62,17 @@ internal class ChromiumDownloadClient : DownloadClient { IPage page = this.browser.NewPageAsync().Result; page.DefaultTimeout = 10000; - IResponse response = page.GoToAsync(url, WaitUntilNavigation.Networkidle0).Result; - Log("Page loaded."); + IResponse response; + try + { + response = page.GoToAsync(url, WaitUntilNavigation.Networkidle0).Result; + Log("Page loaded."); + } + catch (Exception e) + { + Log($"Could not load Page:\n{e.Message}"); + return new RequestResult(HttpStatusCode.InternalServerError, null, Stream.Null); + } Stream stream = Stream.Null; HtmlDocument? document = null;