From cb5764c654a70e9eea092d6b9aa55990c0e598cb Mon Sep 17 00:00:00 2001 From: Bogdan Date: Tue, 8 Oct 2024 01:44:36 +0300 Subject: [PATCH] Log exceptions when getting indexer definitions Closes #2245 --- .../IndexerVersions/IndexerDefinitionUpdateService.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/NzbDrone.Core/IndexerVersions/IndexerDefinitionUpdateService.cs b/src/NzbDrone.Core/IndexerVersions/IndexerDefinitionUpdateService.cs index 672a08837..b4f58222a 100644 --- a/src/NzbDrone.Core/IndexerVersions/IndexerDefinitionUpdateService.cs +++ b/src/NzbDrone.Core/IndexerVersions/IndexerDefinitionUpdateService.cs @@ -94,8 +94,10 @@ namespace NzbDrone.Core.IndexerVersions var response = _httpClient.Get>(request); indexerList = response.Resource.Where(i => !_definitionBlocklist.Contains(i.File)).ToList(); } - catch + catch (Exception ex) { + _logger.Warn(ex, "Error while getting indexer definitions, fallback to reading from disk."); + var definitionFolder = Path.Combine(_appFolderInfo.AppDataFolder, "Definitions"); indexerList = ReadDefinitionsFromDisk(indexerList, definitionFolder); @@ -106,9 +108,9 @@ namespace NzbDrone.Core.IndexerVersions indexerList = ReadDefinitionsFromDisk(indexerList, customDefinitionFolder); } - catch + catch (Exception ex) { - _logger.Error("Failed to Connect to Indexer Definition Server for Indexer listing"); + _logger.Error(ex, "Failed to Connect to Indexer Definition Server for Indexer listing"); } return indexerList;