Skip to content

Commit

Permalink
Fixed: (MaM) Handle Auth Errors & Session Expiry
Browse files Browse the repository at this point in the history
  • Loading branch information
bakerboy448 authored and Qstick committed Apr 16, 2022
1 parent 302ed91 commit 51e7320
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/NzbDrone.Core/Indexers/Definitions/MyAnonamouse.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down

0 comments on commit 51e7320

Please sign in to comment.