1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-11-05 02:22:31 +01:00

Fixed: Test messaging when indexer API returns an error with a message

This commit is contained in:
Mark McDowall 2015-10-27 22:04:20 -07:00
parent e4e687c2a4
commit f0933b9786
2 changed files with 7 additions and 5 deletions

View File

@ -1,14 +1,16 @@
using NzbDrone.Common.Exceptions; using NzbDrone.Core.Indexers.Exceptions;
namespace NzbDrone.Core.Indexers.Newznab namespace NzbDrone.Core.Indexers.Newznab
{ {
public class NewznabException : NzbDroneException public class NewznabException : IndexerException
{ {
public NewznabException(string message, params object[] args) : base(message, args) public NewznabException(IndexerResponse response, string message, params object[] args)
: base(response, message, args)
{ {
} }
public NewznabException(string message) : base(message) public NewznabException(IndexerResponse response, string message)
: base(response, message)
{ {
} }
} }

View File

@ -37,7 +37,7 @@ protected override bool PreProcess(IndexerResponse indexerResponse)
throw new RequestLimitReachedException("API limit reached"); throw new RequestLimitReachedException("API limit reached");
} }
throw new NewznabException("Newznab error detected: {0}", errorMessage); throw new NewznabException(indexerResponse, errorMessage);
} }
protected override ReleaseInfo ProcessItem(XElement item, ReleaseInfo releaseInfo) protected override ReleaseInfo ProcessItem(XElement item, ReleaseInfo releaseInfo)