diff --git a/src/NzbDrone.Core/Indexers/Definitions/Avistaz/AvistazParser.cs b/src/NzbDrone.Core/Indexers/Definitions/Avistaz/AvistazParser.cs index 100ce0a8c..5c48c835a 100644 --- a/src/NzbDrone.Core/Indexers/Definitions/Avistaz/AvistazParser.cs +++ b/src/NzbDrone.Core/Indexers/Definitions/Avistaz/AvistazParser.cs @@ -24,6 +24,11 @@ namespace NzbDrone.Core.Indexers.Definitions.Avistaz { var torrentInfos = new List(); + if (indexerResponse.HttpResponse.StatusCode == HttpStatusCode.NotFound) + { + return torrentInfos.ToArray(); + } + if (indexerResponse.HttpResponse.StatusCode != HttpStatusCode.OK) { throw new IndexerException(indexerResponse, $"Unexpected response status {indexerResponse.HttpResponse.StatusCode} code from API request"); diff --git a/src/NzbDrone.Core/Indexers/HttpIndexerBase.cs b/src/NzbDrone.Core/Indexers/HttpIndexerBase.cs index 0c69d2f83..87c3a692e 100644 --- a/src/NzbDrone.Core/Indexers/HttpIndexerBase.cs +++ b/src/NzbDrone.Core/Indexers/HttpIndexerBase.cs @@ -441,7 +441,7 @@ namespace NzbDrone.Core.Indexers response = await _httpClient.ExecuteAsync(request.HttpRequest); } - // Throw any other http error we get after attempting auth + // Throw common http errors here before we try to parse if (response.HasHttpError) { _logger.Warn("HTTP Error - {0}", response); @@ -450,10 +450,6 @@ namespace NzbDrone.Core.Indexers { throw new TooManyRequestsException(request.HttpRequest, response); } - else - { - throw new HttpException(request.HttpRequest, response); - } } UpdateCookies(Cookies, DateTime.Now + TimeSpan.FromDays(30));