Fixed: (MaM) Handle Auth Errors & Session Expiry

This commit is contained in:
bakerboy448 2022-02-03 23:59:56 -06:00 committed by Qstick
parent 302ed91d05
commit 51e73205ba

View file

@ -317,6 +317,12 @@ public MyAnonamouseParser(MyAnonamouseSettings settings, IndexerCapabilitiesCate
public IList<ReleaseInfo> ParseResponse(IndexerResponse indexerResponse)
{
// Throw auth errors here before we try to parse
if (indexerResponse.HttpResponse.StatusCode == HttpStatusCode.Forbidden)
{
throw new IndexerAuthException("[403 Forbidden] - mam_session_id expired or invalid");
}
// Throw common http errors here before we try to parse
if (indexerResponse.HttpResponse.StatusCode != HttpStatusCode.OK)
{