mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
Better Captcha message.
This commit is contained in:
@@ -246,6 +246,18 @@ namespace NzbDrone.Core.Indexers
|
||||
_indexerStatusService.RecordFailure(Definition.Id);
|
||||
_logger.Warn("Invalid API Key for {0} {1}", this, url);
|
||||
}
|
||||
catch (CloudFlareCaptchaException ex)
|
||||
{
|
||||
_indexerStatusService.RecordFailure(Definition.Id);
|
||||
if (ex.IsExpired)
|
||||
{
|
||||
_logger.Error(ex, "Expired CAPTCHA token for {0}, please refresh in indexer settings.", this);
|
||||
}
|
||||
else
|
||||
{
|
||||
_logger.Error(ex, "CAPTCHA token required for {0}, check indexer settings.", this);
|
||||
}
|
||||
}
|
||||
catch (IndexerException ex)
|
||||
{
|
||||
_indexerStatusService.RecordFailure(Definition.Id);
|
||||
@@ -314,9 +326,16 @@ namespace NzbDrone.Core.Indexers
|
||||
{
|
||||
_logger.Warn("Request limit reached");
|
||||
}
|
||||
catch (CloudFlareCaptchaException)
|
||||
catch (CloudFlareCaptchaException ex)
|
||||
{
|
||||
return new ValidationFailure("CaptchaToken", "Site protected by CloudFlare CAPTCHA. Valid CAPTCHA token required.");
|
||||
if (ex.IsExpired)
|
||||
{
|
||||
return new ValidationFailure("CaptchaToken", "CloudFlare CAPTCHA token expired, please Refresh.");
|
||||
}
|
||||
else
|
||||
{
|
||||
return new ValidationFailure("CaptchaToken", "Site protected by CloudFlare CAPTCHA. Valid CAPTCHA token required.");
|
||||
}
|
||||
}
|
||||
catch (UnsupportedFeedException ex)
|
||||
{
|
||||
|
Reference in New Issue
Block a user