From 780420e799a804a7169bee29c11d074bd4ff8671 Mon Sep 17 00:00:00 2001 From: Bogdan Date: Fri, 15 Sep 2023 16:26:57 +0300 Subject: [PATCH] Log exceptions for failed fetches in Custom and Sonarr import lists Co-authored-by: bakerboy448 <55419169+bakerboy448@users.noreply.github.com> (cherry picked from commit c1d9187bb66c0524048020613d816918b84b5532) --- src/NzbDrone.Core/ImportLists/Custom/CustomImport.cs | 4 +++- src/NzbDrone.Core/ImportLists/Lidarr/LidarrImport.cs | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/NzbDrone.Core/ImportLists/Custom/CustomImport.cs b/src/NzbDrone.Core/ImportLists/Custom/CustomImport.cs index afce13495..0cd6d5151 100644 --- a/src/NzbDrone.Core/ImportLists/Custom/CustomImport.cs +++ b/src/NzbDrone.Core/ImportLists/Custom/CustomImport.cs @@ -45,8 +45,10 @@ namespace NzbDrone.Core.ImportLists.Custom _importListStatusService.RecordSuccess(Definition.Id); } - catch + catch (Exception ex) { + _logger.Debug(ex, "Failed to fetch data for list {0} ({1})", Definition.Name, Name); + _importListStatusService.RecordFailure(Definition.Id); } diff --git a/src/NzbDrone.Core/ImportLists/Lidarr/LidarrImport.cs b/src/NzbDrone.Core/ImportLists/Lidarr/LidarrImport.cs index be0f28fd8..80cb2b6e1 100644 --- a/src/NzbDrone.Core/ImportLists/Lidarr/LidarrImport.cs +++ b/src/NzbDrone.Core/ImportLists/Lidarr/LidarrImport.cs @@ -75,8 +75,10 @@ namespace NzbDrone.Core.ImportLists.Lidarr _importListStatusService.RecordSuccess(Definition.Id); } - catch + catch (Exception ex) { + _logger.Debug(ex, "Failed to fetch data for list {0} ({1})", Definition.Name, Name); + _importListStatusService.RecordFailure(Definition.Id); }