Added better log message when indexer reached daily grab limit.

This commit is contained in:
Taloth Saldono 2016-06-14 23:15:41 +02:00
parent 32a347bdd2
commit b320a23bf8
2 changed files with 16 additions and 2 deletions

View File

@ -130,7 +130,14 @@ namespace NzbDrone.Core.Download
} }
catch (HttpException ex) catch (HttpException ex)
{ {
_logger.Error(ex, "Downloading torrent file for episode '{0}' failed ({1})", remoteEpisode.Release.Title, torrentUrl); if ((int)ex.Response.StatusCode == 429)
{
_logger.Error("API Grab Limit reached for {0}", torrentUrl);
}
else
{
_logger.Error(ex, "Downloading torrent file for episode '{0}' failed ({1})", remoteEpisode.Release.Title, torrentUrl);
}
throw new ReleaseDownloadException(remoteEpisode.Release, "Downloading torrent failed", ex); throw new ReleaseDownloadException(remoteEpisode.Release, "Downloading torrent failed", ex);
} }

View File

@ -53,7 +53,14 @@ namespace NzbDrone.Core.Download
} }
catch (HttpException ex) catch (HttpException ex)
{ {
_logger.Error(ex, "Downloading nzb for episode '{0}' failed ({1})", remoteEpisode.Release.Title, url); if ((int)ex.Response.StatusCode == 429)
{
_logger.Error("API Grab Limit reached for {0}", url);
}
else
{
_logger.Error(ex, "Downloading nzb for episode '{0}' failed ({1})", remoteEpisode.Release.Title, url);
}
throw new ReleaseDownloadException(remoteEpisode.Release, "Downloading nzb failed", ex); throw new ReleaseDownloadException(remoteEpisode.Release, "Downloading nzb failed", ex);
} }