From 89b609a2213c2a30c46c4198001ad4f038cecedc Mon Sep 17 00:00:00 2001 From: bakerboy448 <55419169+bakerboy448@users.noreply.github.com> Date: Wed, 22 Feb 2023 19:36:12 -0600 Subject: [PATCH] Fixed: Improve some request failure messaging (cherry picked from commit e968919e63616e30cc401964bd51db8e9e0e26de) Fixes #8152 --- src/NzbDrone.Core/Download/Clients/Deluge/Deluge.cs | 4 ++-- src/NzbDrone.Core/ImportLists/HttpImportListBase.cs | 12 ++++++------ .../ImportLists/Radarr/RadarrV3Proxy.cs | 8 ++++---- src/NzbDrone.Core/Indexers/HttpIndexerBase.cs | 4 ++-- src/NzbDrone.Core/Indexers/Newznab/Newznab.cs | 2 +- src/NzbDrone.Core/Indexers/Torznab/Torznab.cs | 2 +- 6 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/NzbDrone.Core/Download/Clients/Deluge/Deluge.cs b/src/NzbDrone.Core/Download/Clients/Deluge/Deluge.cs index 22a7bbb38..2b8da9cbc 100644 --- a/src/NzbDrone.Core/Download/Clients/Deluge/Deluge.cs +++ b/src/NzbDrone.Core/Download/Clients/Deluge/Deluge.cs @@ -177,7 +177,7 @@ public override IEnumerable GetItems() } // Here we detect if Deluge is managing the torrent and whether the seed criteria has been met. - // This allows drone to delete the torrent as appropriate. + // This allows Radarr to delete the torrent as appropriate. item.CanMoveFiles = item.CanBeRemoved = torrent.IsAutoManaged && torrent.StopAtRatio && @@ -270,7 +270,7 @@ private ValidationFailure TestConnection() case WebExceptionStatus.SecureChannelFailure: return new NzbDroneValidationFailure("UseSsl", "Unable to connect through SSL") { - DetailedDescription = "Drone is unable to connect to Deluge using SSL. This problem could be computer related. Please try to configure both Radarr and Deluge to not use SSL." + DetailedDescription = "Radarr is unable to connect to Deluge using SSL. This problem could be computer related. Please try to configure both Radarr and Deluge to not use SSL." }; default: return new NzbDroneValidationFailure(string.Empty, "Unknown exception: " + ex.Message); diff --git a/src/NzbDrone.Core/ImportLists/HttpImportListBase.cs b/src/NzbDrone.Core/ImportLists/HttpImportListBase.cs index a97974f8c..4b0f54d3d 100644 --- a/src/NzbDrone.Core/ImportLists/HttpImportListBase.cs +++ b/src/NzbDrone.Core/ImportLists/HttpImportListBase.cs @@ -189,7 +189,7 @@ protected virtual ValidationFailure TestConnection() if (releases.Empty()) { return new NzbDroneValidationFailure(string.Empty, - "No results were returned from your import list, please check your settings.") + "No results were returned from your import list, please check your settings and the log for details.") { IsWarning = true }; } } @@ -199,21 +199,21 @@ protected virtual ValidationFailure TestConnection() } catch (UnsupportedFeedException ex) { - _logger.Warn(ex, "Import List feed is not supported"); + _logger.Warn(ex, "Import list feed is not supported"); - return new ValidationFailure(string.Empty, "Import List feed is not supported: " + ex.Message); + return new ValidationFailure(string.Empty, "Import list feed is not supported: " + ex.Message); } catch (ImportListException ex) { _logger.Warn(ex, "Unable to connect to list"); - return new ValidationFailure(string.Empty, "Unable to connect to list. " + ex.Message); + return new ValidationFailure(string.Empty, $"Unable to connect to import list: {ex.Message}. Check the log surrounding this error for details."); } catch (Exception ex) { - _logger.Warn(ex, "Unable to connect to list"); + _logger.Warn(ex, "Unable to connect to import list"); - return new ValidationFailure(string.Empty, "Unable to connect to list, check the log for more details"); + return new ValidationFailure(string.Empty, $"Unable to connect to import list: {ex.Message}. Check the log surrounding this error for details."); } return null; diff --git a/src/NzbDrone.Core/ImportLists/Radarr/RadarrV3Proxy.cs b/src/NzbDrone.Core/ImportLists/Radarr/RadarrV3Proxy.cs index d4c930213..70867853d 100644 --- a/src/NzbDrone.Core/ImportLists/Radarr/RadarrV3Proxy.cs +++ b/src/NzbDrone.Core/ImportLists/Radarr/RadarrV3Proxy.cs @@ -57,13 +57,13 @@ public ValidationFailure Test(RadarrSettings settings) return new ValidationFailure("ApiKey", "API Key is invalid"); } - _logger.Error(ex, "Unable to send test message"); - return new ValidationFailure("ApiKey", "Unable to send test message"); + _logger.Error(ex, "Unable to connect to import list."); + return new ValidationFailure(string.Empty, $"Unable to connect to import list: {ex.Message}. Check the log surrounding this error for details."); } catch (Exception ex) { - _logger.Error(ex, "Unable to send test message"); - return new ValidationFailure("", "Unable to send test message"); + _logger.Error(ex, "Unable to connect to import list."); + return new ValidationFailure(string.Empty, $"Unable to connect to import list: {ex.Message}. Check the log surrounding this error for details."); } return null; diff --git a/src/NzbDrone.Core/Indexers/HttpIndexerBase.cs b/src/NzbDrone.Core/Indexers/HttpIndexerBase.cs index 653846ddf..267bb3a4f 100644 --- a/src/NzbDrone.Core/Indexers/HttpIndexerBase.cs +++ b/src/NzbDrone.Core/Indexers/HttpIndexerBase.cs @@ -383,14 +383,14 @@ protected virtual ValidationFailure TestConnection() { _logger.Warn(ex, "Unable to connect to indexer"); - return new ValidationFailure(string.Empty, "Unable to connect to indexer, check the log for more details"); + return new ValidationFailure(string.Empty, "Unable to connect to indexer. " + ex.Message); } } catch (Exception ex) { _logger.Warn(ex, "Unable to connect to indexer"); - return new ValidationFailure(string.Empty, "Unable to connect to indexer, check the log for more details"); + return new ValidationFailure(string.Empty, $"Unable to connect to indexer: {ex.Message}. Check the log surrounding this error for details"); } return null; diff --git a/src/NzbDrone.Core/Indexers/Newznab/Newznab.cs b/src/NzbDrone.Core/Indexers/Newznab/Newznab.cs index 73ecfb96b..c08124e5d 100644 --- a/src/NzbDrone.Core/Indexers/Newznab/Newznab.cs +++ b/src/NzbDrone.Core/Indexers/Newznab/Newznab.cs @@ -155,7 +155,7 @@ protected virtual ValidationFailure TestCapabilities() { _logger.Warn(ex, "Unable to connect to indexer: " + ex.Message); - return new ValidationFailure(string.Empty, "Unable to connect to indexer, check the log for more details"); + return new ValidationFailure(string.Empty, $"Unable to connect to indexer: {ex.Message}. Check the log surrounding this error for details"); } } diff --git a/src/NzbDrone.Core/Indexers/Torznab/Torznab.cs b/src/NzbDrone.Core/Indexers/Torznab/Torznab.cs index 95b21c20b..a1081f02d 100644 --- a/src/NzbDrone.Core/Indexers/Torznab/Torznab.cs +++ b/src/NzbDrone.Core/Indexers/Torznab/Torznab.cs @@ -146,7 +146,7 @@ protected virtual ValidationFailure TestCapabilities() { _logger.Warn(ex, "Unable to connect to indexer: " + ex.Message); - return new ValidationFailure(string.Empty, "Unable to connect to indexer, check the log for more details"); + return new ValidationFailure(string.Empty, $"Unable to connect to indexer: {ex.Message}. Check the log surrounding this error for details"); } }