mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
log newsnab 429 errors as warn instead of exceptions
This commit is contained in:
@@ -50,13 +50,14 @@ namespace NzbDrone.Common.Test.Http
|
||||
[TestCase(HttpStatusCode.InternalServerError)]
|
||||
[TestCase(HttpStatusCode.ServiceUnavailable)]
|
||||
[TestCase(HttpStatusCode.BadGateway)]
|
||||
public void should_throw_on_unsuccessful_status_codes(HttpStatusCode statusCode)
|
||||
[TestCase(429)]
|
||||
public void should_throw_on_unsuccessful_status_codes(int statusCode)
|
||||
{
|
||||
var request = new HttpRequest("http://eu.httpbin.org/status/" + (int)statusCode);
|
||||
var request = new HttpRequest("http://eu.httpbin.org/status/" + statusCode);
|
||||
|
||||
var exception = Assert.Throws<HttpException>(() => Subject.Get<HttpBinResource>(request));
|
||||
|
||||
exception.Response.StatusCode.Should().Be(statusCode);
|
||||
((int)exception.Response.StatusCode).Should().Be(statusCode);
|
||||
|
||||
ExceptionVerification.IgnoreWarns();
|
||||
}
|
||||
|
Reference in New Issue
Block a user