From f02901cd320acdbee8b7a63e0ac52fbb88932cd0 Mon Sep 17 00:00:00 2001 From: nopoz Date: Wed, 15 May 2024 16:19:21 -0700 Subject: [PATCH] copy over all exceptions from src/NzbDrone.Core/ImportLists/HttpImportListBase.cs into new override --- .../ImportLists/Plex/PlexImport.cs | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/src/NzbDrone.Core/ImportLists/Plex/PlexImport.cs b/src/NzbDrone.Core/ImportLists/Plex/PlexImport.cs index ff0865cac..430f1af0e 100644 --- a/src/NzbDrone.Core/ImportLists/Plex/PlexImport.cs +++ b/src/NzbDrone.Core/ImportLists/Plex/PlexImport.cs @@ -7,6 +7,8 @@ using NzbDrone.Common.Extensions; using NzbDrone.Common.Http; using NzbDrone.Core.Configuration; using NzbDrone.Core.Exceptions; +using NzbDrone.Core.ImportLists.Exceptions; +using NzbDrone.Core.Indexers.Exceptions; using NzbDrone.Core.Localization; using NzbDrone.Core.Notifications.Plex.PlexTv; using NzbDrone.Core.Parser; @@ -122,10 +124,27 @@ namespace NzbDrone.Core.ImportLists.Plex _logger.Info("No results were returned from Plex Watchlist."); } } + catch (RequestLimitReachedException) + { + _logger.Warn("Request limit reached"); + } + catch (UnsupportedFeedException ex) + { + _logger.Warn(ex, "Plex Watchlist feed is not supported"); + + return new ValidationFailure(string.Empty, "Plex Watchlist feed is not supported: " + ex.Message); + } + catch (ImportListException ex) + { + _logger.Warn(ex, "Unable to connect to Plex Watchlist"); + + return new ValidationFailure(string.Empty, $"Unable to connect to Plex Watchlist: {ex.Message}. Check the log surrounding this error for details."); + } catch (Exception ex) { _logger.Warn(ex, "Unable to connect to Plex Watchlist"); - return new ValidationFailure(string.Empty, $"Unable to connect to Plex Watchlist: {ex.Message}. Check the log for details."); + + return new ValidationFailure(string.Empty, $"Unable to connect to Plex Watchlist: {ex.Message}. Check the log surrounding this error for details."); } return null;