From e1c5f3ed6d3cd9f49ebdc886458bcdb1f7d9be7b Mon Sep 17 00:00:00 2001 From: kaso17 Date: Thu, 17 May 2018 16:31:24 +0200 Subject: [PATCH] Cardigann: handle unauthorized error code --- src/Jackett.Common/Indexers/CardigannIndexer.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Jackett.Common/Indexers/CardigannIndexer.cs b/src/Jackett.Common/Indexers/CardigannIndexer.cs index a7801aad0..900cf0268 100644 --- a/src/Jackett.Common/Indexers/CardigannIndexer.cs +++ b/src/Jackett.Common/Indexers/CardigannIndexer.cs @@ -363,6 +363,9 @@ namespace Jackett.Common.Indexers protected bool checkForError(WebClientStringResult loginResult, IList errorBlocks) { + if(loginResult.Status == HttpStatusCode.Unauthorized) // e.g. used by YGGtorrent + throw new ExceptionWithConfigData("401 Unauthorized, check your credentials", configData); + if (errorBlocks == null) return true; // no error