You can safely re-use policies at multiple call sites, and execute through policies concurrently on different threads. So the Handle and therefore the Or methods can also do a little more than just handle the exception, they also allow us to supply a function which takes the exception and returns a boolean. Making statements based on opinion; back them up with references or personal experience. It would probably be clearer to say that 'whitelisting' and 'blacklisting' exceptions could not be mixed, and 'all except' was an entirely alternative fluent stream. You can rate examples to help us improve the quality of examples. c# - Polly policy to log exception and rethrow - Stack Overflow The Polly Wait and Retry HTTP GET Request extension, allows you to make GET requests to a specified URL while utilizing a Wait and Retry pattern based on either the Status Code or Body content conditions.This extension is designed for quickly checking the operational status of a system. The problem was not in Poly, this is was related to not awaited task, which caused this problem. Is it possible to handle different exceptions differently with the same policy? For versions supporting earlier targets such as .NET4.0 and .NET3.5, see the supported targets grid. It receives an Actionas a first parameter and the number of times we want to retry (numberOfRetries) as a second parameter. Neither package seems to exist, although I found some sub-packages for Polly.Contrib that didn't seem related. Why did US v. Assange skip the court of appeal? Add policy to handle all exceptions except specified one, introductions to Retry and CircuitBreaker in the wiki, Timeout quite probably means that requested resource is in trouble (working on top of its capacity) and adding retries makes things even worse (puts more stress on the resource already in stress, opens more long-hanging connections etc. Is it returning them wrapped in something else? Why catch and rethrow an exception in C#? Policy, Polly C# (CSharp) Code Examples - HotExamples Interpreting non-statistically significant results: Do we have "no evidence" or "insufficient evidence" to reject the null? What differentiates living as mere roommates from living in a marriage-like relationship? Have a question about this project? CircuitState.Isolated - Circuit held manually in an open state. In real-world scenarios, you. If so, that doesn't mean the catch in the Call<>() method won't catch it later - it just means the debugger has stopped earlier, at the first-chance when the exception is first thrown, to show the exception to you. So both policies (correctly) handled the error. So basically Polly allows you to create a Policy which can then be used to execute against a method which might have exceptions - so for example maybe the method calls a webservice and as well as possibly getting exceptions from the webservice may have exceptions on the client such as the service being down or the likes. Frequently Used Methods Show Policy Class Documentation Example #1 2 Show file File: OrdersClientController.cs Project: iancooper/ServiceDiscovery-Tutorial Polly handle response and check status code - Stack Overflow