DEV Community

Cover image for Adding Auto-Retries to a C# API Client
Roger Jin
Roger Jin

Posted on

Adding Auto-Retries to a C# API Client

Oldest comments (3)

Collapse
 
grobert profile image
Gabriel Robert

Do you know the existence of Polly? It implements this pattern out of the box.

Collapse
 
rogerjin12 profile image
Roger Jin

Wow, no I didn't! This is great.

Collapse
 
meebey profile image
Mirco Bauer

There is a small bug in the last line in last code block:

return new AggregateException(...)

Should be:

throw new AggregateException(...)