Rework Cloudflare Protection Detection

This commit is contained in:
Qstick
2022-07-04 22:17:39 -05:00
parent e85ccd5808
commit 09ed132fe6
19 changed files with 87 additions and 181 deletions
@@ -0,0 +1,16 @@
using NzbDrone.Common.Exceptions;
using NzbDrone.Common.Http;
namespace NzbDrone.Core.Http.CloudFlare
{
public class CloudFlareProtectionException : NzbDroneException
{
public HttpResponse Response { get; set; }
public CloudFlareProtectionException(HttpResponse response)
: base("Unable to access {0}, blocked by CloudFlare Protection.", response.Request.Url.Host)
{
Response = response;
}
}
}