Avoid swallowing cancelation attempts via exception handling

This commit is contained in:
whimsical-c4lic0 2026-02-18 04:50:45 -06:00
parent 8facc470f0
commit 65b25e6336
2 changed files with 9 additions and 0 deletions

View File

@ -635,6 +635,10 @@ public class ApiService(IAuthService authService, IConfigService configService,
return returnUrls; return returnUrls;
} }
catch (OperationCanceledException)
{
throw;
}
catch (Exception ex) catch (Exception ex)
{ {
ExceptionLoggerHelper.LogException(ex); ExceptionLoggerHelper.LogException(ex);

View File

@ -1,4 +1,5 @@
using System.Globalization; using System.Globalization;
using System.Diagnostics;
using System.Security.Cryptography; using System.Security.Cryptography;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using FFmpeg.NET; using FFmpeg.NET;
@ -262,6 +263,10 @@ public class DownloadService(
Constants.DrmDownloadMaxRetries, mediaId); Constants.DrmDownloadMaxRetries, mediaId);
return false; return false;
} }
catch (OperationCanceledException)
{
throw;
}
catch (Exception ex) catch (Exception ex)
{ {
ExceptionLoggerHelper.LogException(ex); ExceptionLoggerHelper.LogException(ex);