From f4bbf2f8af473d6c4156d310e2cd6e1ee296422f Mon Sep 17 00:00:00 2001 From: Bakerboy448 <55419169+bakerboy448@users.noreply.github.com> Date: Thu, 27 Oct 2022 16:20:27 -0500 Subject: [PATCH] Fixed: (Avistaz) Handle 429 Request Limit Reached --- .../Indexers/Definitions/Avistaz/AvistazParser.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/NzbDrone.Core/Indexers/Definitions/Avistaz/AvistazParser.cs b/src/NzbDrone.Core/Indexers/Definitions/Avistaz/AvistazParser.cs index c38fb9df4..183a8ef03 100644 --- a/src/NzbDrone.Core/Indexers/Definitions/Avistaz/AvistazParser.cs +++ b/src/NzbDrone.Core/Indexers/Definitions/Avistaz/AvistazParser.cs @@ -29,6 +29,11 @@ namespace NzbDrone.Core.Indexers.Definitions.Avistaz return torrentInfos.ToArray(); } + if (indexerResponse.HttpResponse.StatusCode == HttpStatusCode.TooManyRequests) + { + throw new RequestLimitReachedException(indexerResponse, "API Request Limit Reached"); + } + if (indexerResponse.HttpResponse.StatusCode != HttpStatusCode.OK) { throw new IndexerException(indexerResponse, $"Unexpected response status {indexerResponse.HttpResponse.StatusCode} code from API request");