mirror of https://github.com/lidarr/Lidarr
Fixed: Show TLS errors in UI when testing download clients
This commit is contained in:
parent
1baf415924
commit
e912ef6a3e
|
@ -267,7 +267,11 @@ namespace NzbDrone.Core.Download.Clients.Deluge
|
|||
catch (Exception ex)
|
||||
{
|
||||
_logger.Error(ex, "Failed to test connection");
|
||||
return new NzbDroneValidationFailure(string.Empty, "Unknown exception: " + ex.Message);
|
||||
|
||||
return new NzbDroneValidationFailure("Host", "Unable to connect to Deluge")
|
||||
{
|
||||
DetailedDescription = ex.Message
|
||||
};
|
||||
}
|
||||
|
||||
return null;
|
||||
|
|
|
@ -266,6 +266,11 @@ namespace NzbDrone.Core.Download.Clients.Deluge
|
|||
}
|
||||
catch (WebException ex)
|
||||
{
|
||||
if (ex.Status == WebExceptionStatus.TrustFailure)
|
||||
{
|
||||
throw new DownloadClientUnavailableException("Unable to connect to Deluge, certificate validation failed.", ex);
|
||||
}
|
||||
|
||||
throw new DownloadClientUnavailableException("Unable to connect to Deluge, please check your settings", ex);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -85,6 +85,11 @@ namespace NzbDrone.Core.Download.Clients.DownloadStation.Proxies
|
|||
}
|
||||
catch (WebException ex)
|
||||
{
|
||||
if (ex.Status == WebExceptionStatus.TrustFailure)
|
||||
{
|
||||
throw new DownloadClientUnavailableException("Unable to connect to Diskstation, certificate validation failed.", ex);
|
||||
}
|
||||
|
||||
throw new DownloadClientUnavailableException("Unable to connect to Diskstation, please check your settings", ex);
|
||||
}
|
||||
|
||||
|
|
|
@ -388,7 +388,11 @@ namespace NzbDrone.Core.Download.Clients.DownloadStation
|
|||
catch (Exception ex)
|
||||
{
|
||||
_logger.Error(ex, "Error testing Torrent Download Station");
|
||||
return new NzbDroneValidationFailure(string.Empty, $"Unknown exception: {ex.Message}");
|
||||
|
||||
return new NzbDroneValidationFailure("Host", "Unable to connect to Torrent Download Station")
|
||||
{
|
||||
DetailedDescription = ex.Message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -286,7 +286,11 @@ namespace NzbDrone.Core.Download.Clients.DownloadStation
|
|||
catch (Exception ex)
|
||||
{
|
||||
_logger.Error(ex, "Error testing Torrent Download Station");
|
||||
return new NzbDroneValidationFailure(string.Empty, "Unknown exception: " + ex.Message);
|
||||
|
||||
return new NzbDroneValidationFailure("Host", "Unable to connect to Usenet Download Station")
|
||||
{
|
||||
DetailedDescription = ex.Message
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -158,7 +158,8 @@ namespace NzbDrone.Core.Download.Clients.Hadouken
|
|||
|
||||
if (version < new Version("5.1"))
|
||||
{
|
||||
return new ValidationFailure(string.Empty, "Old Hadouken client with unsupported API, need 5.1 or higher");
|
||||
return new ValidationFailure(string.Empty,
|
||||
"Old Hadouken client with unsupported API, need 5.1 or higher");
|
||||
}
|
||||
}
|
||||
catch (DownloadClientAuthenticationException ex)
|
||||
|
@ -167,6 +168,13 @@ namespace NzbDrone.Core.Download.Clients.Hadouken
|
|||
|
||||
return new NzbDroneValidationFailure("Password", "Authentication failed");
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
return new NzbDroneValidationFailure("Host", "Unable to connect to Hadouken")
|
||||
{
|
||||
DetailedDescription = ex.Message
|
||||
};
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -90,6 +90,11 @@ namespace NzbDrone.Core.Download.Clients.Hadouken
|
|||
}
|
||||
catch (WebException ex)
|
||||
{
|
||||
if (ex.Status == WebExceptionStatus.TrustFailure)
|
||||
{
|
||||
throw new DownloadClientUnavailableException("Unable to connect to Hadouken, certificate validation failed.", ex);
|
||||
}
|
||||
|
||||
throw new DownloadClientUnavailableException("Unable to connect to Hadouken, please check your settings", ex);
|
||||
}
|
||||
|
||||
|
|
|
@ -163,7 +163,11 @@ namespace NzbDrone.Core.Download.Clients.NzbVortex
|
|||
catch (Exception ex)
|
||||
{
|
||||
_logger.Error(ex, "Unable to connect to NZBVortex");
|
||||
return new ValidationFailure("Host", "Unable to connect to NZBVortex");
|
||||
|
||||
return new NzbDroneValidationFailure("Host", "Unable to connect to NZBVortex")
|
||||
{
|
||||
DetailedDescription = ex.Message
|
||||
};
|
||||
}
|
||||
|
||||
return null;
|
||||
|
|
|
@ -165,6 +165,11 @@ namespace NzbDrone.Core.Download.Clients.NzbVortex
|
|||
}
|
||||
catch (WebException ex)
|
||||
{
|
||||
if (ex.Status == WebExceptionStatus.TrustFailure)
|
||||
{
|
||||
throw new DownloadClientUnavailableException("Unable to connect to NZBVortex, certificate validation failed.", ex);
|
||||
}
|
||||
|
||||
throw new DownloadClientUnavailableException("Unable to connect to NZBVortex, please check your settings", ex);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -381,7 +381,11 @@ namespace NzbDrone.Core.Download.Clients.QBittorrent
|
|||
catch (Exception ex)
|
||||
{
|
||||
_logger.Error(ex, "Unable to test qBittorrent");
|
||||
return new NzbDroneValidationFailure(string.Empty, "Unknown exception: " + ex.Message);
|
||||
|
||||
return new NzbDroneValidationFailure("Host", "Unable to connect to qBittorrent")
|
||||
{
|
||||
DetailedDescription = ex.Message
|
||||
};
|
||||
}
|
||||
|
||||
return null;
|
||||
|
|
|
@ -54,6 +54,11 @@ namespace NzbDrone.Core.Download.Clients.QBittorrent
|
|||
}
|
||||
catch (WebException ex)
|
||||
{
|
||||
if (ex.Status == WebExceptionStatus.TrustFailure)
|
||||
{
|
||||
throw new DownloadClientUnavailableException("Unable to connect to qBittorrent, certificate validation failed.", ex);
|
||||
}
|
||||
|
||||
throw new DownloadClientException("Failed to connect to qBittorrent, check your settings.", ex);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -261,15 +261,17 @@ namespace NzbDrone.Core.Download.Clients.Transmission
|
|||
}
|
||||
catch (DownloadClientUnavailableException ex)
|
||||
{
|
||||
_logger.Error(ex, "Unable to connect to transmission");
|
||||
return new NzbDroneValidationFailure("Host", "Unable to connect")
|
||||
{
|
||||
DetailedDescription = "Please verify the hostname and port."
|
||||
};
|
||||
_logger.Error(ex, ex.Message);
|
||||
|
||||
return new NzbDroneValidationFailure("Host", "Unable to connect to Transmission")
|
||||
{
|
||||
DetailedDescription = ex.Message
|
||||
};
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.Error(ex, "Failed to test");
|
||||
|
||||
return new NzbDroneValidationFailure(string.Empty, "Unknown exception: " + ex.Message);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -308,6 +308,11 @@ namespace NzbDrone.Core.Download.Clients.Transmission
|
|||
}
|
||||
catch (WebException ex)
|
||||
{
|
||||
if (ex.Status == WebExceptionStatus.TrustFailure)
|
||||
{
|
||||
throw new DownloadClientUnavailableException("Unable to connect to Transmission, certificate validation failed.", ex);
|
||||
}
|
||||
|
||||
throw new DownloadClientUnavailableException("Unable to connect to Transmission, please check your settings", ex);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -208,7 +208,11 @@ namespace NzbDrone.Core.Download.Clients.RTorrent
|
|||
catch (Exception ex)
|
||||
{
|
||||
_logger.Error(ex, "Failed to test rTorrent");
|
||||
return new NzbDroneValidationFailure(string.Empty, "Unknown exception: " + ex.Message);
|
||||
|
||||
return new NzbDroneValidationFailure("Host", "Unable to connect to rTorrent")
|
||||
{
|
||||
DetailedDescription = ex.Message
|
||||
};
|
||||
}
|
||||
|
||||
return null;
|
||||
|
|
|
@ -264,6 +264,11 @@ namespace NzbDrone.Core.Download.Clients.RTorrent
|
|||
}
|
||||
catch (WebException ex)
|
||||
{
|
||||
if (ex.Status == WebExceptionStatus.TrustFailure)
|
||||
{
|
||||
throw new DownloadClientUnavailableException("Unable to connect to rTorrent, certificate validation failed.", ex);
|
||||
}
|
||||
|
||||
throw new DownloadClientUnavailableException("Unable to connect to rTorrent, please check your settings", ex);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -291,7 +291,11 @@ namespace NzbDrone.Core.Download.Clients.UTorrent
|
|||
catch (Exception ex)
|
||||
{
|
||||
_logger.Error(ex, "Failed to test uTorrent");
|
||||
return new NzbDroneValidationFailure(string.Empty, "Unknown exception: " + ex.Message);
|
||||
|
||||
return new NzbDroneValidationFailure("Host", "Unable to connect to uTorrent")
|
||||
{
|
||||
DetailedDescription = ex.Message
|
||||
};
|
||||
}
|
||||
|
||||
return null;
|
||||
|
|
|
@ -231,6 +231,11 @@ namespace NzbDrone.Core.Download.Clients.UTorrent
|
|||
}
|
||||
catch (WebException ex)
|
||||
{
|
||||
if (ex.Status == WebExceptionStatus.TrustFailure)
|
||||
{
|
||||
throw new DownloadClientUnavailableException("Unable to connect to uTorrent, certificate validation failed.", ex);
|
||||
}
|
||||
|
||||
throw new DownloadClientException("Unable to connect to uTorrent, please check your settings", ex);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue