Fixed: Improve some request failure messaging
This commit is contained in:
parent
6ec32eb45d
commit
e968919e63
|
@ -175,7 +175,7 @@ namespace NzbDrone.Core.Download.Clients.Deluge
|
|||
}
|
||||
|
||||
// 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 Sonarr to delete the torrent as appropriate.
|
||||
item.CanMoveFiles = item.CanBeRemoved =
|
||||
torrent.IsAutoManaged &&
|
||||
torrent.StopAtRatio &&
|
||||
|
@ -254,12 +254,12 @@ namespace NzbDrone.Core.Download.Clients.Deluge
|
|||
case WebExceptionStatus.ConnectionClosed:
|
||||
return new NzbDroneValidationFailure("UseSsl", "Verify SSL settings")
|
||||
{
|
||||
DetailedDescription = "Please verify your SSL configuration on both Deluge and NzbDrone."
|
||||
DetailedDescription = "Please verify your SSL configuration on both Deluge and Sonarr."
|
||||
};
|
||||
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 drone and Deluge to not use SSL."
|
||||
DetailedDescription = "Sonarr is unable to connect to Deluge using SSL. This problem could be computer related. Please try to configure both Sonarr and Deluge to not use SSL."
|
||||
};
|
||||
default:
|
||||
return new NzbDroneValidationFailure(string.Empty, "Unknown exception: " + ex.Message);
|
||||
|
|
|
@ -49,13 +49,13 @@ namespace NzbDrone.Core.ImportLists.Custom
|
|||
return new ValidationFailure("BaseUrl", "It seems we are unauthorized to make this request.");
|
||||
}
|
||||
|
||||
_logger.Error(ex, "Unable to send test message");
|
||||
_logger.Error(ex, "Unable to connect to import list.");
|
||||
return new ValidationFailure("BaseUrl", $"We are unable to make the request to that URL. StatusCode: {ex.Response.StatusCode}");
|
||||
}
|
||||
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;
|
||||
|
|
|
@ -215,7 +215,7 @@ namespace NzbDrone.Core.ImportLists
|
|||
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 };
|
||||
}
|
||||
}
|
||||
|
@ -233,13 +233,13 @@ namespace NzbDrone.Core.ImportLists
|
|||
{
|
||||
_logger.Warn(ex, "Unable to connect to import list");
|
||||
|
||||
return new ValidationFailure(string.Empty, "Unable to connect to import 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 import list");
|
||||
|
||||
return new ValidationFailure(string.Empty, "Unable to connect to import 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;
|
||||
|
|
|
@ -63,13 +63,13 @@ namespace NzbDrone.Core.ImportLists.Sonarr
|
|||
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;
|
||||
|
|
|
@ -389,7 +389,7 @@ namespace NzbDrone.Core.Indexers
|
|||
{
|
||||
_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;
|
||||
|
|
|
@ -134,7 +134,7 @@ namespace NzbDrone.Core.Indexers.Newznab
|
|||
{
|
||||
_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");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -126,7 +126,7 @@ namespace NzbDrone.Core.Indexers.Torznab
|
|||
{
|
||||
_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");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@ namespace NzbDrone.Core.Notifications.Notifiarr
|
|||
catch (Exception ex)
|
||||
{
|
||||
_logger.Error(ex, ex.Message);
|
||||
return new ValidationFailure("", "Unable to send test notification. Check the log for more details.");
|
||||
return new ValidationFailure(string.Empty, "Unable to send test notification: {ex.Message}. Check the log surrounding this error for details");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue