bunq / sdk_csharp

C# SDK for bunq API
MIT License
35 stars 22 forks source link

Added RetryHandler. (bunq/sdk_csharp#80) #106

Open nduijvelshoff opened 6 years ago

nduijvelshoff commented 6 years ago
nduijvelshoff commented 6 years ago

@OGKevin I don't see why my commit message is failed, the regex is a full match.

image
OGKevin commented 6 years ago

Yea the regex failure seems magic to me as well. But to my eyes it loos good so we will ignore it 😉

OGKevin commented 6 years ago

@nduijvelshoff are you going to finish this ?

nduijvelshoff commented 6 years ago

@OGKevin Hi Kevin, I can do this... Just a bit busy this week. :-)

nduijvelshoff commented 6 years ago

I'll check it on Monday. Off for the weekend.

On Jun 29, 2018 16:34, Kevin Hellemun notifications@github.com wrote:

@OGKevin commented on this pull request.


In BunqSdk/Http/RetryHandler.cshttps://github.com/bunq/sdk_csharp/pull/106#discussion_r199178975:

+using System.Net.Http; +using System.Threading; +using System.Threading.Tasks; +using Polly; + +namespace Bunq.Sdk.Http +{

  • public class RetryHandler : DelegatingHandler
  • {
  • public RetryHandler(HttpClientHandler handler) : base(handler) { }
  • protected override Task SendAsync(
  • HttpRequestMessage request,
  • CancellationToken cancellationToken) =>
  • Policy
  • .Handle()

Hmm i meant to only retry when this exception is thrown TooManyRequestsException Cant you use this exception to catch and handle ?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/bunq/sdk_csharp/pull/106#discussion_r199178975, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ADmub1dzoiWAyt2hlIhFrXIanwq58DQEks5uBjrhgaJpZM4UzoCV.