From 89efa76f7657291d49afeb32d97e65e79afdbb7c Mon Sep 17 00:00:00 2001 From: Roger Far Date: Wed, 20 Sep 2023 19:55:08 -0600 Subject: [PATCH] Add extra error logging on the RealDebrid GetClient. --- .../Services/TorrentClients/RealDebridTorrentClient.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/server/RdtClient.Service/Services/TorrentClients/RealDebridTorrentClient.cs b/server/RdtClient.Service/Services/TorrentClients/RealDebridTorrentClient.cs index 3e688d6..62922b2 100644 --- a/server/RdtClient.Service/Services/TorrentClients/RealDebridTorrentClient.cs +++ b/server/RdtClient.Service/Services/TorrentClients/RealDebridTorrentClient.cs @@ -45,6 +45,15 @@ public class RealDebridTorrentClient : ITorrentClient return rdtNetClient; } + catch (AggregateException ae) + { + foreach (var inner in ae.InnerExceptions) + { + _logger.LogError(inner, $"The connection to RealDebrid has failed: {inner.Message}"); + } + + throw; + } catch (TaskCanceledException ex) when (ex.InnerException is TimeoutException) { _logger.LogError(ex, $"The connection to RealDebrid has timed out: {ex.Message}");