diff --git a/DiscordChatExporter.Domain/Exporting/ExportContext.cs b/DiscordChatExporter.Domain/Exporting/ExportContext.cs index 6753ef7a..7e23b4b9 100644 --- a/DiscordChatExporter.Domain/Exporting/ExportContext.cs +++ b/DiscordChatExporter.Domain/Exporting/ExportContext.cs @@ -84,7 +84,10 @@ namespace DiscordChatExporter.Domain.Exporting return relativeFilePath; } - catch (HttpRequestException) + // Try to catch only exceptions related to failed HTTP requests + // https://github.com/Tyrrrz/DiscordChatExporter/issues/332 + // https://github.com/Tyrrrz/DiscordChatExporter/issues/372 + catch (Exception ex) when (ex is HttpRequestException || ex is OperationCanceledException) { // We don't want this to crash the exporting process in case of failure return url;