Telegram.Bot icon indicating copy to clipboard operation
Telegram.Bot copied to clipboard

retry failed requests

Open poulad opened this issue 8 years ago • 4 comments

Feature Request

Proprty on IBotClient to retry requests that fail due to throttling on tg server (429 too many requests).

Could be

myrequest.RetryOptions = new RetryOptions(count: 3, everySecs: 7)

poulad avatar Nov 30 '17 01:11 poulad

I think it should be a property on request base class to allow per request setting. And it means that we need to implement all Bot API methods in terms of requests and responses first.

tuscen avatar Nov 30 '17 03:11 tuscen

I think it should be a property on request base class to allow per request setting. And it means that we need to implement all Bot API methods in terms of requests and responses first.

What about now? 🗻

ch-asimakopoulos avatar Oct 03 '20 09:10 ch-asimakopoulos

What about now? 😉

derigel23 avatar Oct 15 '21 13:10 derigel23

To correct handling it with polly and retry policy ExceptionsParser.Parse should be done in HttpClient DelegateHandler, so in my policy I have access to already parsed ApiResponse and/or ApiException (to get specified timeout). Currently, I need to parse it manually by myself.

derigel23 avatar Oct 15 '21 15:10 derigel23