mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2026-03-05 13:40:08 -05:00
Treat unauthorized newbie accounts in AvistaZ parser
This commit is contained in:
@@ -33,6 +33,12 @@ namespace NzbDrone.Core.Indexers.Definitions.Avistaz
|
||||
throw new RequestLimitReachedException(indexerResponse, "API Request Limit Reached");
|
||||
}
|
||||
|
||||
if (indexerResponse.HttpResponse.StatusCode == HttpStatusCode.Unauthorized)
|
||||
{
|
||||
STJson.TryDeserialize<AvistazErrorResponse>(indexerResponse.HttpResponse.Content, out var errorResponse);
|
||||
throw new IndexerAuthException(errorResponse?.Message ?? "Unauthorized request to indexer");
|
||||
}
|
||||
|
||||
if (indexerResponse.HttpResponse.StatusCode != HttpStatusCode.OK)
|
||||
{
|
||||
throw new IndexerException(indexerResponse, $"Unexpected response status {indexerResponse.HttpResponse.StatusCode} code from indexer request");
|
||||
|
||||
Reference in New Issue
Block a user