Add retry policy for 429 responses

This commit is contained in:
Alexey Golub
2018-06-28 00:20:31 +03:00
parent e3eac10fb8
commit 49f39c7097
4 changed files with 26 additions and 11 deletions

View File

@@ -7,9 +7,13 @@ namespace DiscordChatExporter.Core.Exceptions
{
public HttpStatusCode StatusCode { get; }
public HttpErrorStatusCodeException(HttpStatusCode statusCode)
public string ReasonPhrase { get; }
public HttpErrorStatusCodeException(HttpStatusCode statusCode, string reasonPhrase)
: base($"Error HTTP status code: {statusCode} - {reasonPhrase}")
{
StatusCode = statusCode;
ReasonPhrase = reasonPhrase;
}
}
}