From c1d9187bb66c0524048020613d816918b84b5532 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> --- src/NzbDrone.Core/ImportLists/Custom/CustomImport.cs | 4 +++- src/NzbDrone.Core/ImportLists/Sonarr/SonarrImport.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 93f71e6d8..29157be63 100644 --- a/src/NzbDrone.Core/ImportLists/Custom/CustomImport.cs +++ b/src/NzbDrone.Core/ImportLists/Custom/CustomImport.cs @@ -46,8 +46,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/Sonarr/SonarrImport.cs b/src/NzbDrone.Core/ImportLists/Sonarr/SonarrImport.cs index 7973eac9a..33d701781 100644 --- a/src/NzbDrone.Core/ImportLists/Sonarr/SonarrImport.cs +++ b/src/NzbDrone.Core/ImportLists/Sonarr/SonarrImport.cs @@ -68,8 +68,10 @@ namespace NzbDrone.Core.ImportLists.Sonarr _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); }