From 1d2e4aed4f0a102faa80074ad801db0ee20c74ae Mon Sep 17 00:00:00 2001 From: bakerboy448 <55419169+bakerboy448@users.noreply.github.com> Date: Mon, 14 Mar 2022 23:08:52 -0500 Subject: [PATCH] Fixed: (BTN) Better HTTP Error Handling --- .../Definitions/BroadcastheNet/BroadcastheNetParser.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/NzbDrone.Core/Indexers/Definitions/BroadcastheNet/BroadcastheNetParser.cs b/src/NzbDrone.Core/Indexers/Definitions/BroadcastheNet/BroadcastheNetParser.cs index 242c51a27..e07b0d6f4 100644 --- a/src/NzbDrone.Core/Indexers/Definitions/BroadcastheNet/BroadcastheNetParser.cs +++ b/src/NzbDrone.Core/Indexers/Definitions/BroadcastheNet/BroadcastheNetParser.cs @@ -36,6 +36,10 @@ namespace NzbDrone.Core.Indexers.BroadcastheNet throw new IndexerException(indexerResponse, "Indexer API call returned NotFound, the Indexer API may have changed."); case HttpStatusCode.ServiceUnavailable: throw new RequestLimitReachedException(indexerResponse, "Cannot do more than 150 API requests per hour."); + case HttpStatusCode.GatewayTimeout: + throw new IndexerException(indexerResponse, "Query Failed - Request returned Gateway Timed Out [504]"); + case HttpStatusCode.BadGateway: + throw new IndexerException(indexerResponse, "Query Failed - Server is unavailable [502]"); default: if (indexerHttpResponse.StatusCode != HttpStatusCode.OK) {