Fixed: Indexer failures not logged to history

This commit is contained in:
Qstick
2021-05-16 23:21:29 -04:00
parent 4cc52c415c
commit 5cb13e69d7
10 changed files with 38 additions and 25 deletions
@@ -33,7 +33,7 @@ namespace NzbDrone.Core.Indexers.BroadcastheNet
case HttpStatusCode.NotFound:
throw new IndexerException(indexerResponse, "Indexer API call returned NotFound, the Indexer API may have changed.");
case HttpStatusCode.ServiceUnavailable:
throw new RequestLimitReachedException("Cannot do more than 150 API requests per hour.");
throw new RequestLimitReachedException(indexerResponse, "Cannot do more than 150 API requests per hour.");
default:
if (indexerResponse.HttpResponse.StatusCode != HttpStatusCode.OK)
{
@@ -46,7 +46,7 @@ namespace NzbDrone.Core.Indexers.Headphones
if (errorMessage == "Request limit reached")
{
throw new RequestLimitReachedException("API limit reached");
throw new RequestLimitReachedException(indexerResponse, "API limit reached");
}
throw new NewznabException(indexerResponse, errorMessage);
@@ -45,7 +45,7 @@ namespace NzbDrone.Core.Indexers.Newznab
if (errorMessage == "Request limit reached")
{
throw new RequestLimitReachedException("API limit reached");
throw new RequestLimitReachedException(indexerResponse, "API limit reached");
}
throw new NewznabException(indexerResponse, errorMessage);
@@ -42,7 +42,7 @@ namespace NzbDrone.Core.Indexers.Torznab
if (errorMessage == "Request limit reached")
{
throw new RequestLimitReachedException("API limit reached");
throw new RequestLimitReachedException(indexerResponse, "API limit reached");
}
throw new TorznabException("Torznab error detected: {0}", errorMessage);