mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-04-24 13:57:11 -04:00
Fixed: (RuTracker) Improve the error message for failed logins
This commit is contained in:
parent
96234c0fe1
commit
aafdefe2f0
1 changed files with 5 additions and 1 deletions
|
@ -104,7 +104,11 @@ namespace NzbDrone.Core.Indexers.Definitions
|
|||
|
||||
if (!response.Content.Contains("id=\"logged-in-username\""))
|
||||
{
|
||||
throw new IndexerAuthException("RuTracker Auth Failed");
|
||||
var parser = new HtmlParser();
|
||||
var document = await parser.ParseDocumentAsync(response.Content);
|
||||
var errorMessage = document.QuerySelector("h4.warnColor1.tCenter.mrg_16, div.msg-main")?.TextContent.Trim();
|
||||
|
||||
throw new IndexerAuthException(errorMessage ?? "RuTracker Auth Failed");
|
||||
}
|
||||
|
||||
cookies = response.GetCookies();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue