mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-15 21:06:20 -04:00
Better error messaging when connecting to nzbget fails
This commit is contained in:
@@ -59,7 +59,7 @@ namespace NzbDrone.Core.Download.Clients.Nzbget
|
||||
{
|
||||
var protocol = settings.UseSsl ? "https" : "http";
|
||||
|
||||
var url = String.Format("{0}//{1}:{2}/jsonrpc",
|
||||
var url = String.Format("{0}://{1}:{2}/jsonrpc",
|
||||
protocol,
|
||||
settings.Host,
|
||||
settings.Port);
|
||||
@@ -85,13 +85,13 @@ namespace NzbDrone.Core.Download.Clients.Nzbget
|
||||
{
|
||||
if (response.ResponseStatus != ResponseStatus.Completed)
|
||||
{
|
||||
throw new ApplicationException("Unable to connect to NzbGet, please check your settings");
|
||||
throw new DownloadClientException("Unable to connect to NzbGet, please check your settings");
|
||||
}
|
||||
|
||||
var result = Json.Deserialize<JsonError>(response.Content);
|
||||
|
||||
if (result.Error != null)
|
||||
throw new ApplicationException(result.Error.ToString());
|
||||
throw new DownloadClientException("Error response received from nzbget: {0}", result.Error.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user