From 0697d694e08af3ada4391ed3620ec176190dc447 Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Mon, 2 Jan 2023 16:30:00 -0800 Subject: [PATCH] New: Improved messaging when qBittorrent fails due to host header rejection (cherry picked from commit 48b4cc5f3ffa0cb8eea6748db9091267216cef4f) --- .../Download/Clients/QBittorrent/QBittorrentProxyV2.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/NzbDrone.Core/Download/Clients/QBittorrent/QBittorrentProxyV2.cs b/src/NzbDrone.Core/Download/Clients/QBittorrent/QBittorrentProxyV2.cs index 350a10e15..5ead027d9 100644 --- a/src/NzbDrone.Core/Download/Clients/QBittorrent/QBittorrentProxyV2.cs +++ b/src/NzbDrone.Core/Download/Clients/QBittorrent/QBittorrentProxyV2.cs @@ -45,6 +45,11 @@ public bool IsApiSupported(QBittorrentSettings settings) return true; } + if (response.StatusCode == HttpStatusCode.Unauthorized) + { + throw new DownloadClientException("Failed to connect to qBittorrent. Check your settings and qBittorrent configuration.", new HttpException(response)); + } + if (response.HasHttpError) { throw new DownloadClientException("Failed to connect to qBittorrent, check your settings.", new HttpException(response));